﻿namespace ExamV5.LineStudyExam
{
    using ExamV5;
    using System;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;
    using System.Drawing;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class FrmJoinExamPaper : Page
    {
        private bool bool_0 = true;
        protected Button butSave;
        protected GridView DataGridA;
        protected GridView DataGridB;
        protected GridView DataGridC;
        protected GridView DataGridD;
        protected GridView DataGridE;
        protected GridView DataGridF;
        protected GridView DataGridG;
        protected GridView DataGridH;
        protected GridView DataGridI;
        protected GridView DataGridJ;
        private double double_0 = 0.0;
        protected HtmlInputHidden EndTime;
        protected HtmlForm Form1;
        private HttpCookie httpCookie_0 = null;
        private HttpCookie httpCookie_1 = null;
        private HttpCookie httpCookie_2 = null;
        private HttpCookie httpCookie_3 = null;
        private HttpCookie httpCookie_4 = null;
        protected System.Web.UI.WebControls.Image ImageUser;
        protected int intPaperID = 0;
        protected Label labAFen;
        protected Label labATitle;
        protected Label labBFen;
        protected Label labBTitle;
        protected Label labCFen;
        protected Label labCheckRubricInfo;
        protected Label labCTitle;
        protected Label labDeptName;
        protected Label labDFen;
        protected Label labDTitle;
        protected Label labEFen;
        protected Label labETitle;
        protected Label labExamName;
        protected Label labExamTime;
        protected Label labFFen;
        protected Label labFTitle;
        protected Label labGFen;
        protected Label labGTitle;
        protected Label labHFen;
        protected Label labHTitle;
        protected Label labIFen;
        protected Label labITitle;
        protected Label labJFen;
        protected Label labJTitle;
        protected Label labPaperFen;
        protected Label labRubricListAID;
        protected Label labRubricListBID;
        protected Label labRubricListCID;
        protected Label labRubricListDID;
        protected Label labRubricListEID;
        protected Label labRubricListFID;
        protected Label labRubricListGID;
        protected Label labRubricListHID;
        protected Label labRubricListIID;
        protected Label labRubricListJID;
        protected Label labUserCode;
        protected Label labUserName;
        private PublicFun publicFun_0 = new PublicFun();
        protected HtmlInputHidden RndSaveTime;
        protected ScriptManager SM;
        protected HtmlInputHidden StartTime;
        protected string strEndTime = null;
        private string string_0 = "";
        private string string_1 = "";
        private string string_10 = "";
        private string string_11 = "系统自动批改";
        private string string_12 = "";
        private string string_13 = "";
        private string string_14 = "";
        private string string_15 = "";
        private string string_16 = "";
        private string string_17 = "";
        private string string_18 = "";
        private string string_19 = "";
        private string string_2 = "";
        private string string_20 = "";
        private string string_21 = "";
        private string string_22 = "";
        private string string_23 = "";
        private string string_24 = "";
        private string string_25 = "";
        private string string_26 = "";
        private string string_27 = "";
        private string string_28 = "";
        private string string_29 = "";
        private string string_3 = "系统自动批改";
        private string string_30 = "";
        private string string_31 = "";
        private string string_32 = "";
        private string string_33 = "";
        private string string_34 = "";
        private string string_35 = "";
        private string string_36 = "";
        private string string_37 = "";
        private string string_38 = "";
        private string string_4 = "";
        private string string_5 = "";
        private string string_6 = "";
        private string string_7 = "系统自动批改";
        private string string_8 = "";
        private string string_9 = "";
        protected string strLoadInfo = "0";
        protected string strStartTime = null;
        protected string strSumTime = null;
        protected string strTmpURL = "";
        protected HtmlInputHidden SumTime;
        protected HtmlInputHidden txtARubricListID;
        protected HtmlInputHidden txtBRubricListID;
        protected HtmlInputHidden txtCheckID;
        protected HtmlInputHidden txtCRubricListID;
        protected HtmlInputHidden txtDRubricListID;
        protected HtmlInputHidden txtERubricListID;
        protected HtmlInputHidden txtFRubricListID;
        protected HtmlInputHidden txtGRubricListID;
        protected HtmlInputHidden txtHideComm;
        protected HtmlInputHidden txtHideEnter;
        protected HtmlInputHidden txtHideFocus;
        protected HtmlInputHidden txtHRubricListID;
        protected HtmlInputHidden txtIRubricListID;
        protected HtmlInputHidden txtJRubricListID;
        protected UpdatePanel UPPart;

        protected void butSave_Click(object sender, EventArgs e)
        {
            if (this.txtHideComm.Value.Trim() != "CheckExam")
            {
                try
                {
                    try
                    {
                        if (this.DataGridA.Visible)
                        {
                            this.method_26();
                        }
                        if (this.DataGridB.Visible)
                        {
                            this.method_27();
                        }
                        if (this.DataGridC.Visible)
                        {
                            this.method_28();
                        }
                        if (this.DataGridD.Visible)
                        {
                            this.method_29();
                        }
                        if (this.DataGridE.Visible)
                        {
                            this.method_30();
                        }
                        if (this.DataGridF.Visible)
                        {
                            this.method_31();
                        }
                        if (this.DataGridG.Visible)
                        {
                            this.method_32();
                        }
                        if (this.DataGridH.Visible)
                        {
                            this.method_33();
                        }
                        if (this.DataGridI.Visible)
                        {
                            this.method_34();
                        }
                        if (this.DataGridJ.Visible)
                        {
                            this.method_35();
                        }
                        string str2 = "";
                        if (!(this.publicFun_0.GetValues(string.Concat(new object[] { "select PaperID from CheckPaper where UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID }), "PaperID") == ""))
                        {
                            str2 = "update CheckPaper set RubricSWrite='" + this.string_1 + "',RubricSOK='" + this.string_2 + "',RubricSFen='" + this.string_0 + "',RubricDWrite='" + this.string_5 + "',RubricDOK='" + this.string_6 + "',RubricDFen='" + this.string_4 + "',";
                            str2 = str2 + "RubricBWrite='" + this.string_9 + "',RubricBOK='" + this.string_10 + "',RubricBFen='" + this.string_8 + "',RubricFFen='" + this.string_12 + "',";
                            str2 = str2 + "RubricAFen='" + this.string_16 + "',RubricCFen='" + this.string_20 + "',";
                            str2 = str2 + "RubricTFen='" + this.string_24 + "',RubricANFen='" + this.string_28 + "',";
                            str2 = str2 + "CheckUserS='" + this.string_3 + "',CheckUserD='" + this.string_7 + "',CheckUserB='" + this.string_11 + "',";
                            str2 = string.Concat(new object[] { 
                                str2, "CheckUserF='", this.string_15, "',CheckUserA='", this.string_19, "',CheckUserC='", this.string_23, "',CheckUserT='", this.string_27, "',CheckUserAN='", this.string_30, "',RubricJFen='", this.string_35, "',CheckUserJ='", this.string_38, "',RubricOOK='", 
                                this.string_34, "',RubricOFen='", this.string_32, "',CheckUserO='", this.string_33, "' where UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID
                             });
                        }
                        else
                        {
                            str2 = "Insert into CheckPaper(PaperID,UserCode,RubricSWrite,RubricSOK,RubricSFen,RubricDWrite,RubricDOK,RubricDFen,RubricBWrite,RubricBOK,RubricBFen,RubricFFen,RubricAFen,RubricCFen,RubricTFen,RubricANFen,CheckUserS,CheckUserD,CheckUserB,CheckUserF,CheckUserA,CheckUserC,CheckUserT,CheckUserAN,RubricJFen,CheckUserJ,RubricOOK,RubricOFen,CheckUserO) values(" + this.intPaperID;
                            str2 = str2 + ",'" + this.httpCookie_0.Value.Trim() + "','" + this.string_1 + "','" + this.string_2 + "','" + this.string_0 + "','" + this.string_5 + "','" + this.string_6 + "','" + this.string_4 + "','" + this.string_9 + "','" + this.string_10 + "','" + this.string_8 + "','" + this.string_12 + "',";
                            str2 = str2 + "'" + this.string_16 + "','" + this.string_20 + "','" + this.string_24 + "','" + this.string_28 + "'";
                            str2 = str2 + ",'" + this.string_3 + "','" + this.string_7 + "','" + this.string_11 + "','" + this.string_15 + "','" + this.string_19 + "','" + this.string_23 + "','" + this.string_27 + "','" + this.string_30 + "','" + this.string_35 + "','" + this.string_38 + "','" + this.string_34 + "','" + this.string_32 + "','" + this.string_33 + "')";
                        }
                        string str = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString();
                        this.publicFun_0.ExecuteSql(string.Concat(new object[] { str2, ";update ExamUser set IsSave='1',EndTime='", str, "' where UserCode='", this.httpCookie_0.Value.Trim(), "' and PaperID=", this.intPaperID }));
                        SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                        connection.Open();
                        SqlCommand command = new SqlCommand(string.Concat(new object[] { "update CheckPaper set RubricFWrite=@RubricFWrite,RubricFOK=@RubricFOK,RubricAWrite=@RubricAWrite,RubricAOK=@RubricAOK,RubricCWrite=@RubricCWrite,RubricCOK=@RubricCOK,RubricTWrite=@RubricTWrite,RubricTOK=@RubricTOK,RubricANWrite=@RubricANWrite,RubricANOK=@RubricANOK,RubricJWrite=@RubricJWrite,RubricJOK=@RubricJOK  where UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID }), connection);
                        command.Parameters.Add("@RubricFWrite", SqlDbType.VarChar, 0x1388).Value = this.string_13;
                        command.Parameters.Add("@RubricFOK", SqlDbType.VarChar, 0x1388).Value = this.string_14;
                        command.Parameters.Add("@RubricAWrite", SqlDbType.Text).Value = this.string_17;
                        command.Parameters.Add("@RubricAOK", SqlDbType.Text).Value = this.string_18;
                        command.Parameters.Add("@RubricCWrite", SqlDbType.Text).Value = this.string_21;
                        command.Parameters.Add("@RubricCOK", SqlDbType.Text).Value = this.string_22;
                        command.Parameters.Add("@RubricTWrite", SqlDbType.Text).Value = this.string_25;
                        command.Parameters.Add("@RubricTOK", SqlDbType.Text).Value = this.string_26;
                        command.Parameters.Add("@RubricANWrite", SqlDbType.Text).Value = this.string_29;
                        command.Parameters.Add("@RubricANOK", SqlDbType.Text).Value = this.string_31;
                        command.Parameters.Add("@RubricJWrite", SqlDbType.Text).Value = this.string_36;
                        command.Parameters.Add("@RubricJOK", SqlDbType.Text).Value = this.string_37;
                        command.ExecuteNonQuery();
                        command.Dispose();
                        connection.Close();
                        connection.Dispose();
                    }
                    catch
                    {
                    }
                    return;
                }
                finally
                {
                    this.RndSaveTime.Value = "0";
                    int num2 = new Random().Next(60);
                    string connectionString = ConfigurationManager.ConnectionStrings["SaveMin"].ConnectionString;
                    string str5 = ConfigurationManager.ConnectionStrings["SaveMax"].ConnectionString;
                    if (num2 >= Convert.ToInt32(connectionString))
                    {
                        if (num2 <= Convert.ToInt32(str5))
                        {
                            this.RndSaveTime.Value = num2.ToString();
                        }
                        else
                        {
                            this.RndSaveTime.Value = str5;
                        }
                    }
                    else
                    {
                        this.RndSaveTime.Value = connectionString;
                    }
                    if (this.txtHideComm.Value.Trim() == "AutoSaveExam")
                    {
                        this.labCheckRubricInfo.Text = "系统自动保存成功！";
                    }
                    if (this.txtHideComm.Value.Trim() == "SaveExam")
                    {
                        this.labCheckRubricInfo.Text = "人工保存成功！系统会自动保存,不用频繁操作！";
                    }
                }
            }
            this.method_36();
        }

        private void method_0()
        {
            double num = 0.0;
            string values = this.publicFun_0.GetValues(string.Concat(new object[] { "select StudyFen from GradeReule where PaperID=", this.intPaperID, " and (", this.double_0, ">=MinValue  and ", this.double_0, "<=MaxValue)" }), "StudyFen");
            if (values.Trim() == "")
            {
                values = "0";
            }
            num = Convert.ToDouble(values);
            string str2 = this.ViewState["ExamName"].ToString();
            this.publicFun_0.ExecuteSql(string.Concat(new object[] { "delete  UserStudyFen where ExamOrStudy='E' and UserCode='", this.httpCookie_0.Value, "' and Formtable='PaperInfo' and FormID=", this.intPaperID, ";insert into UserStudyFen(UserCode,ExamStudyName,StudyFen,Formtable,FormID,ExamOrStudy) values('", this.httpCookie_0.Value, "','", str2, "','", num, "','PaperInfo','", this.intPaperID, "','E')" }));
        }

        private void method_1(string string_39)
        {
            string strSql = "";
            if (string_39 == "B")
            {
                string str4 = Convert.ToString(base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
                if (!(!(str4 == "") ? (str4 != null) : false))
                {
                    str4 = Convert.ToString(base.Request.ServerVariables["REMOTE_ADDR"]);
                }
                string str3 = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString();
                strSql = string.Concat(new object[] { "update ExamUser set JoinExamNum=JoinExamNum+1,StartTime='", str3, "',JoinDate='", DateTime.Now.ToShortDateString(), "',LoginIP='", str4, "',Flag='", string_39, "' where UserCode='", this.httpCookie_0.Value.Trim(), "' and PaperID=", this.intPaperID });
            }
            else
            {
                string str2 = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString();
                strSql = string.Concat(new object[] { "update ExamUser set EndTime='", str2, "',LastDate='", DateTime.Now.ToShortDateString(), "',Flag='", string_39, "',GetOldCountFen='", this.double_0.ToString("0.00"), "',GetCountFen='", this.double_0.ToString("0.00"), "' where UserCode='", this.httpCookie_0.Value.Trim(), "' and PaperID=", this.intPaperID });
            }
            this.publicFun_0.ExecuteSql(strSql);
        }

        private void method_10(string string_39, string string_40)
        {
            this.DataGridF.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo  Where RubricType='F'";
            selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "CRubric");
            this.DataGridF.DataSource = dataSet.Tables["CRubric"].DefaultView;
            this.DataGridF.DataBind();
            for (int i = 0; i < this.DataGridF.Rows.Count; i++)
            {
                num++;
                if (i != 0)
                {
                    this.labRubricListFID.Text = string.Concat(new object[] { this.labRubricListFID.Text, "<a href='#F", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                else
                {
                    this.labRubricListFID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeF'>", this.publicFun_0.GetRubricType("F", this.intPaperID.ToString()), "</a>:</B> <a href='#F", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                Label label2 = (Label) this.DataGridF.Rows[i].FindControl("labFDataTitle");
                label2.Text = string.Concat(new object[] { "<a title='标记此题'  href='#F", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListFID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label2.Text.ToString(), "<a name='F", i.ToString(), "'></a>" });
                TextBox box = (TextBox) this.DataGridF.Rows[i].FindControl("txtFAnswer");
                box.Attributes.Add("onpaste", "return false");
                box.Attributes.Add("onmouseout", string.Concat(new object[] { "javascript:WriteText('DataGridF_txtFAnswer_", i.ToString(), "','labRubricListFID','", num, "')" }));
                Label label = (Label) this.DataGridF.Rows[i].FindControl("labFOKAnswer");
                if (!(this.httpCookie_1.Value == "黎光宇"))
                {
                    label.Visible = false;
                }
                else
                {
                    label.Visible = true;
                    label.ForeColor = Color.White;
                }
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_11(string string_39, string string_40)
        {
            this.DataGridG.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo  Where RubricType='G'";
            selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "TRubric");
            this.DataGridG.DataSource = dataSet.Tables["TRubric"].DefaultView;
            this.DataGridG.DataBind();
            for (int i = 0; i < this.DataGridG.Rows.Count; i++)
            {
                num++;
                if (i != 0)
                {
                    this.labRubricListGID.Text = string.Concat(new object[] { this.labRubricListGID.Text, "<a href='#G", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                else
                {
                    this.labRubricListGID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeG'>", this.publicFun_0.GetRubricType("G", this.intPaperID.ToString()), "</a>:</B> <a href='#G", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                Label label2 = (Label) this.DataGridG.Rows[i].FindControl("labGDataTitle");
                label2.Text = string.Concat(new object[] { "<a title='标记此题'  href='#G", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListGID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label2.Text.ToString(), "<a name='G", i.ToString(), "'></a>" });
                TextBox box = (TextBox) this.DataGridG.Rows[i].FindControl("txtGAnswer");
                box.Attributes.Add("onpaste", "return false");
                box.Attributes.Add("onmouseout", string.Concat(new object[] { "javascript:WriteText('DataGridG_txtGAnswer_", i.ToString(), "','labRubricListGID','", num, "')" }));
                Label label = (Label) this.DataGridG.Rows[i].FindControl("labGOKAnswer");
                if (!(this.httpCookie_1.Value == "黎光宇"))
                {
                    label.Visible = false;
                }
                else
                {
                    label.Visible = true;
                    label.ForeColor = Color.White;
                }
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_12(string string_39, string string_40)
        {
            this.DataGridH.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo Where RubricType='H'";
            selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "ANRubric");
            this.DataGridH.DataSource = dataSet.Tables["ANRubric"].DefaultView;
            this.DataGridH.DataBind();
            for (int i = 0; i < this.DataGridH.Rows.Count; i++)
            {
                num++;
                if (i == 0)
                {
                    this.labRubricListHID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeH'>", this.publicFun_0.GetRubricType("H", this.intPaperID.ToString()), "</a>:</B> <a href='#H", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                else
                {
                    this.labRubricListHID.Text = string.Concat(new object[] { this.labRubricListHID.Text, "<a href='#H", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                Label label2 = (Label) this.DataGridH.Rows[i].FindControl("labHDataTitle");
                label2.Text = string.Concat(new object[] { "<a title='标记此题'  href='#H", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListHID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label2.Text.ToString(), "<a name='H", i.ToString(), "'></a>" });
                TextBox box = (TextBox) this.DataGridH.Rows[i].FindControl("txtHAnswer");
                box.Attributes.Add("onpaste", "return false");
                box.Attributes.Add("onmouseout", string.Concat(new object[] { "javascript:WriteText('DataGridH_txtHAnswer_", i.ToString(), "','labRubricListHID','", num, "')" }));
                Label label = (Label) this.DataGridH.Rows[i].FindControl("labHOKAnswer");
                if (!(this.httpCookie_1.Value == "黎光宇"))
                {
                    label.Visible = false;
                }
                else
                {
                    label.Visible = true;
                    label.ForeColor = Color.White;
                }
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_13(string string_39, string string_40)
        {
            this.DataGridI.Visible = true;
            int num = 0;
            string str = "";
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo Where RubricType='I'";
            selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "IRubric");
            this.DataGridI.DataSource = dataSet.Tables["IRubric"].DefaultView;
            this.DataGridI.DataBind();
            for (int i = 0; i < this.DataGridI.Rows.Count; i++)
            {
                num++;
                if (i != 0)
                {
                    this.labRubricListIID.Text = string.Concat(new object[] { this.labRubricListIID.Text, "<a href='#I", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                else
                {
                    this.labRubricListIID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeI'>", this.publicFun_0.GetRubricType("I", this.intPaperID.ToString()), "</a>:</B> <a href='#I", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                Label label3 = (Label) this.DataGridI.Rows[i].FindControl("labIDataTitle");
                label3.Text = string.Concat(new object[] { "<a title='标记此题'  href='#I", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListIID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label3.Text.ToString(), "<a name='I", i.ToString(), "'></a>" });
                Label label2 = (Label) this.DataGridI.Rows[i].FindControl("labIAnswer");
                Label label = (Label) this.DataGridI.Rows[i].FindControl("labID");
                if (label2.Text.Length > 6)
                {
                    label2.Text = "&nbsp;&nbsp;&nbsp;&nbsp;<a href='../FrmDownLoad.aspx?FileName=" + label2.Text + "' target='_blank'>下载原题</a>";
                }
                label.Text = string.Concat(new object[] { "<iframe id='file' name='file' src='FrmUPLoadFile.aspx?PaperID=", this.intPaperID, "&ID=", dataSet.Tables["IRubric"].Rows[i]["ID"].ToString(), "&Sort=", i.ToString(), "' height='22px' width='500'  frameborder='0' scrolling='no'></iframe>" });
                str = str + "|";
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
            if ((str.Trim() != "") && (this.publicFun_0.GetValues(string.Concat(new object[] { "select PaperID from CheckPaper where UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID }), "PaperID") == ""))
            {
                this.publicFun_0.ExecuteSql(string.Concat(new object[] { "insert into CheckPaper(PaperID,UserCode,RubricOWrite) values(", this.intPaperID, ",'", this.httpCookie_0.Value, "','", str, "')" }));
            }
        }

        private void method_14(string string_39, string string_40)
        {
            this.DataGridJ.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo Where RubricType='J'";
            selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "JRubric");
            this.DataGridJ.DataSource = dataSet.Tables["JRubric"].DefaultView;
            this.DataGridJ.DataBind();
            for (int i = 0; i < this.DataGridJ.Rows.Count; i++)
            {
                num++;
                if (i != 0)
                {
                    this.labRubricListJID.Text = string.Concat(new object[] { this.labRubricListJID.Text, "<a href='#J", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                else
                {
                    this.labRubricListJID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeJ'>", this.publicFun_0.GetRubricType("J", this.intPaperID.ToString()), "</a>:</B> <a href='#J", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                Label label2 = (Label) this.DataGridJ.Rows[i].FindControl("labJDataTitle");
                label2.Text = string.Concat(new object[] { "<a title='标记此题'  href='#J", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListJID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label2.Text.ToString(), "<a name='J", i.ToString(), "'></a>" });
                TextBox box = (TextBox) this.DataGridJ.Rows[i].FindControl("txtJAnswer");
                box.Attributes.Add("onpaste", "return false");
                box.Attributes.Add("onmouseout", string.Concat(new object[] { "javascript:WriteText('DataGridJ_txtJAnswer_", i.ToString(), "','labRubricListJID','", num, "')" }));
                Label label = (Label) this.DataGridJ.Rows[i].FindControl("labJOKAnswer");
                if (this.httpCookie_1.Value == "黎光宇")
                {
                    label.Visible = true;
                    label.ForeColor = Color.White;
                }
                else
                {
                    label.Visible = false;
                }
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_15()
        {
            string str = "";
            string str2 = "";
            string str3 = "";
            string str4 = "";
            string str5 = "";
            string str6 = "";
            string str7 = "";
            string str8 = "";
            string str9 = "";
            string str10 = "";
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlCommand command = new SqlCommand(string.Concat(new object[] { "select RubricSWrite,RubricDWrite,RubricBWrite,RubricFWrite,RubricAWrite,RubricCWrite,RubricTWrite,RubricANWrite,RubricOWrite,RubricJWrite from CheckPaper where UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID }), connection);
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                str = reader["RubricSWrite"].ToString().Trim();
                str2 = reader["RubricDWrite"].ToString().Trim();
                str3 = reader["RubricBWrite"].ToString().Trim();
                str4 = reader["RubricFWrite"].ToString().Trim();
                str5 = reader["RubricAWrite"].ToString().Trim();
                str6 = reader["RubricCWrite"].ToString().Trim();
                str7 = reader["RubricTWrite"].ToString().Trim();
                str8 = reader["RubricANWrite"].ToString().Trim();
                str9 = reader["RubricOWrite"].ToString().Trim();
                str10 = reader["RubricJWrite"].ToString().Trim();
            }
            reader.Close();
            command.Dispose();
            connection.Close();
            connection.Dispose();
            if (str.Trim() != "")
            {
                this.method_16(str.Trim());
            }
            if (str2.Trim() != "")
            {
                this.method_17(str2.Trim());
            }
            if (str3.Trim() != "")
            {
                this.method_18(str3.Trim());
            }
            if (str4.Trim() != "")
            {
                this.method_19(str4.Trim());
            }
            if (str5.Trim() != "")
            {
                this.method_20(str5.Trim());
            }
            if (str6.Trim() != "")
            {
                this.method_21(str6.Trim());
            }
            if (str7.Trim() != "")
            {
                this.method_22(str7.Trim());
            }
            if (str8.Trim() != "")
            {
                this.method_23(str8.Trim());
            }
            if (str9.Trim() != "")
            {
                this.method_24(str9.Trim());
            }
            if (str10.Trim() != "")
            {
                this.method_25(str10.Trim());
            }
        }

        private void method_16(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridA.Rows.Count; i++)
            {
                num++;
                RadioButtonList list = (RadioButtonList) this.DataGridA.Rows[i].FindControl("RBLAData");
                if (strArray[i].Trim() != "未填写")
                {
                    list.Items.FindByValue(strArray[i].Trim()).Selected = true;
                    this.labRubricListAID.Text = this.labRubricListAID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_17(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridB.Rows.Count; i++)
            {
                num++;
                CheckBoxList list = (CheckBoxList) this.DataGridB.Rows[i].FindControl("CBLBData");
                if (strArray[i].Trim() != "未填写")
                {
                    string[] strArray2 = strArray[i].Trim().Split(new char[] { '#' });
                    for (int j = 0; j < strArray2.Length; j++)
                    {
                        if (strArray2[j].Trim() != "")
                        {
                            list.Items.FindByValue(strArray2[j].Trim()).Selected = true;
                        }
                    }
                    this.labRubricListBID.Text = this.labRubricListBID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_18(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridC.Rows.Count; i++)
            {
                num++;
                RadioButtonList list = (RadioButtonList) this.DataGridC.Rows[i].FindControl("RBLCData");
                if (strArray[i].Trim() != "未填写")
                {
                    list.Items.FindByValue(strArray[i].Trim()).Selected = true;
                    this.labRubricListCID.Text = this.labRubricListCID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_19(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridD.Rows.Count; i++)
            {
                num++;
                TextBox box2 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerA");
                TextBox box3 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerB");
                TextBox box = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerC");
                TextBox box4 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerD");
                TextBox box5 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerE");
                TextBox box6 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerF");
                if (strArray[i].Trim() != "未填写")
                {
                    string[] strArray2 = strArray[i].Trim().Split(new char[] { '#' });
                    switch (strArray2.Length)
                    {
                        case 1:
                            box2.Text = strArray2[0].Trim();
                            break;

                        case 2:
                            box2.Text = strArray2[0].Trim();
                            box3.Text = strArray2[1].Trim();
                            break;

                        case 3:
                            box2.Text = strArray2[0].Trim();
                            box3.Text = strArray2[1].Trim();
                            box.Text = strArray2[2].Trim();
                            break;

                        case 4:
                            box2.Text = strArray2[0].Trim();
                            box3.Text = strArray2[1].Trim();
                            box.Text = strArray2[2].Trim();
                            box4.Text = strArray2[3].Trim();
                            break;

                        case 5:
                            box2.Text = strArray2[0].Trim();
                            box3.Text = strArray2[1].Trim();
                            box.Text = strArray2[2].Trim();
                            box4.Text = strArray2[3].Trim();
                            box5.Text = strArray2[4].Trim();
                            break;

                        case 6:
                            box2.Text = strArray2[0].Trim();
                            box3.Text = strArray2[1].Trim();
                            box.Text = strArray2[2].Trim();
                            box4.Text = strArray2[3].Trim();
                            box5.Text = strArray2[4].Trim();
                            box6.Text = strArray2[5].Trim();
                            break;
                    }
                    if (((((box2.Text.Trim() != "") || (box3.Text.Trim() != "")) || ((box.Text.Trim() != "") || (box4.Text.Trim() != ""))) || (box5.Text.Trim() != "")) || (box6.Text.Trim() != ""))
                    {
                        this.labRubricListDID.Text = this.labRubricListDID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                    }
                }
            }
        }

        private string method_2(int int_0)
        {
            switch (int_0)
            {
                case 1:
                    return "一、";

                case 2:
                    return "二、";

                case 3:
                    return "三、";

                case 4:
                    return "四、";

                case 5:
                    return "五、";

                case 6:
                    return "六、";

                case 7:
                    return "七、";

                case 8:
                    return "八、";

                case 9:
                    return "九、";

                case 10:
                    return "十、";
            }
            return "";
        }

        private void method_20(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridE.Rows.Count; i++)
            {
                num++;
                TextBox box = (TextBox) this.DataGridE.Rows[i].FindControl("txtEAnswer");
                if (strArray[i].Trim() != "未填写")
                {
                    box.Text = strArray[i].Trim().Replace(" <br/>", "\n");
                    this.labRubricListEID.Text = this.labRubricListEID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_21(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridF.Rows.Count; i++)
            {
                num++;
                TextBox box = (TextBox) this.DataGridF.Rows[i].FindControl("txtFAnswer");
                if (strArray[i].Trim() != "未填写")
                {
                    box.Text = strArray[i].Trim().Replace(" <br/>", "\n");
                    this.labRubricListFID.Text = this.labRubricListFID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_22(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridG.Rows.Count; i++)
            {
                num++;
                TextBox box = (TextBox) this.DataGridG.Rows[i].FindControl("txtGAnswer");
                if (strArray[i].Trim() != "未填写")
                {
                    box.Text = strArray[i].Trim().Replace(" <br/>", "\n");
                    this.labRubricListGID.Text = this.labRubricListGID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_23(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridH.Rows.Count; i++)
            {
                num++;
                TextBox box = (TextBox) this.DataGridH.Rows[i].FindControl("txtHAnswer");
                if (strArray[i].Trim() != "未填写")
                {
                    box.Text = strArray[i].Trim().Replace(" <br/>", "\n");
                    this.labRubricListHID.Text = this.labRubricListHID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_24(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridI.Rows.Count; i++)
            {
                num++;
                Label label = (Label) this.DataGridI.Rows[i].FindControl("labIWriteAnswer");
                if (strArray[i].Trim() != "未填写")
                {
                    label.Text = strArray[i].Trim();
                    this.labRubricListIID.Text = this.labRubricListIID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_25(string string_39)
        {
            int num = 0;
            string[] strArray = string_39.Split(new char[] { '|' });
            for (int i = 0; i < this.DataGridJ.Rows.Count; i++)
            {
                num++;
                TextBox box = (TextBox) this.DataGridJ.Rows[i].FindControl("txtJAnswer");
                if (strArray[i].Trim() != "未填写")
                {
                    box.Text = strArray[i].Trim();
                    this.labRubricListJID.Text = this.labRubricListJID.Text.Replace("<font color=blue>" + num.ToString() + "、</font>", "<font color=green>" + num.ToString() + "、</font>");
                }
            }
        }

        private void method_26()
        {
            this.string_3 = "系统自动批改";
            string[] strArray = this.ViewState["NoWrite"].ToString().Split(new char[] { '#' });
            string[] strArray2 = this.ViewState["ErrFen"].ToString().Split(new char[] { '#' });
            for (int i = 0; i < this.DataGridA.Rows.Count; i++)
            {
                try
                {
                    Label label = (Label) this.DataGridA.Rows[i].FindControl("labAOKAnswer");
                    this.string_2 = this.string_2 + label.Text.Trim() + "|";
                    RadioButtonList list = (RadioButtonList) this.DataGridA.Rows[i].FindControl("RBLAData");
                    if (list.SelectedIndex == -1)
                    {
                        this.string_1 = this.string_1 + "未填写|";
                        this.string_0 = this.string_0 + "-" + strArray[0].Trim() + "|";
                        this.double_0 -= Convert.ToDouble(strArray[0].Trim());
                    }
                    else
                    {
                        this.string_1 = this.string_1 + list.SelectedItem.Value.Trim() + "|";
                        if (!(label.Text.Trim().Replace("<BR>", "").Replace("<br>", "").Replace("&nbsp;", "").ToUpper() == list.SelectedItem.Value.Trim()))
                        {
                            this.string_0 = this.string_0 + "-" + strArray2[0].Trim() + "|";
                            this.double_0 -= Convert.ToDouble(strArray2[0].Trim());
                        }
                        else
                        {
                            this.string_0 = this.string_0 + this.labAFen.Text.Trim() + "|";
                            this.double_0 += Convert.ToDouble(this.labAFen.Text.Trim());
                        }
                    }
                }
                catch
                {
                    this.string_1 = this.string_1 + "未填写|";
                    this.string_0 = this.string_0 + "-" + strArray[0].Trim() + "|";
                    this.double_0 -= Convert.ToDouble(strArray[0].Trim());
                    break;
                }
            }
        }

        private void method_27()
        {
            string str = this.publicFun_0.GetValues("select ParmValue from SysParmInfo where ParmMemo='IsCheckBRubric'", "ParmValue").Trim();
            string[] strArray = this.ViewState["NoWrite"].ToString().Split(new char[] { '#' });
            string[] strArray2 = this.ViewState["ErrFen"].ToString().Split(new char[] { '#' });
            this.string_7 = "系统自动批改";
            for (int i = 0; i < this.DataGridB.Rows.Count; i++)
            {
                double num2;
                int num3;
                string[] strArray3;
                int num4;
                string[] strArray4;
                double num5;
                int num6;
                int num7;
                string str2 = "";
                Label label = (Label) this.DataGridB.Rows[i].FindControl("labBOKAnswer");
                this.string_6 = this.string_6 + label.Text.Trim() + "|";
                CheckBoxList list = (CheckBoxList) this.DataGridB.Rows[i].FindControl("CBLBData");
                label.Text = label.Text.Replace("<BR>", "").Replace("<br>", "").Replace("&nbsp;", "").ToUpper();
                for (int j = 0; j < list.Items.Count; j++)
                {
                    if (list.Items[j].Selected)
                    {
                        str2 = str2 + list.Items[j].Value + "#";
                    }
                }
                if (str2.Length <= 0)
                {
                    goto Label_07B7;
                }
                str2 = str2.Substring(0, str2.Length - 1);
                this.string_5 = this.string_5 + str2 + "|";
                if (!(!(str.Trim() == "") ? !(str.Trim() == "Y") : false))
                {
                    goto Label_0612;
                }
                if (str.Trim() != "N")
                {
                    strArray4 = label.Text.Trim().Split(new char[] { '#' });
                    strArray3 = str2.Trim().Split(new char[] { '#' });
                    if (strArray3.Length <= strArray4.Length)
                    {
                        num6 = 0;
                        num7 = 0;
                        while (num7 < strArray4.Length)
                        {
                            if (strArray4[num7].Trim() != "")
                            {
                                num6++;
                            }
                            num7++;
                        }
                        num5 = Convert.ToDouble(this.labBFen.Text.Trim()) / ((double) num6);
                        num2 = 0.0;
                        num3 = 0;
                        while (num3 < strArray3.Length)
                        {
                            if (strArray3[num3].Trim() != "")
                            {
                                num4 = 0;
                                while (num4 < strArray4.Length)
                                {
                                    if (strArray4[num4].Trim() == strArray3[num3].Trim())
                                    {
                                        num2 += num5;
                                    }
                                    num4++;
                                }
                            }
                            num3++;
                        }
                        if (num2 == 0.0)
                        {
                            this.string_4 = this.string_4 + "-" + strArray2[1].Trim() + "|";
                            this.double_0 -= Convert.ToDouble(strArray2[1].Trim());
                        }
                        else
                        {
                            this.string_4 = this.string_4 + num2.ToString("0.00") + "|";
                            this.double_0 += Convert.ToDouble(num2.ToString("0.00"));
                        }
                    }
                    else
                    {
                        this.string_4 = this.string_4 + "-" + strArray2[1].Trim() + "|";
                        this.double_0 -= Convert.ToDouble(strArray2[1].Trim());
                    }
                    continue;
                }
                strArray4 = label.Text.Trim().Split(new char[] { '#' });
                strArray3 = str2.Trim().Split(new char[] { '#' });
                num6 = 0;
                if (strArray3.Length > strArray4.Length)
                {
                    goto Label_05D0;
                }
                for (num7 = 0; num7 < strArray4.Length; num7++)
                {
                    if (strArray4[num7].Trim() != "")
                    {
                        num6++;
                    }
                }
                num5 = Convert.ToDouble(this.labBFen.Text.Trim()) / ((double) num6);
                num2 = 0.0;
                for (num3 = 0; num3 < strArray3.Length; num3++)
                {
                    if (strArray3[num3].Trim() != "")
                    {
                        if (label.Text.Trim().IndexOf(strArray3[num3].Trim()) == -1)
                        {
                            goto Label_052C;
                        }
                        for (num4 = 0; num4 < strArray4.Length; num4++)
                        {
                            if (strArray4[num4].Trim() == strArray3[num3].Trim())
                            {
                                num2 += num5;
                            }
                        }
                    }
                }
                goto Label_0537;
            Label_052C:
                num2 = 0.0;
            Label_0537:
                if (!(num2 == 0.0))
                {
                    this.string_4 = this.string_4 + num2.ToString("0.00") + "|";
                    this.double_0 += Convert.ToDouble(num2.ToString("0.00"));
                }
                else
                {
                    this.string_4 = this.string_4 + "-" + strArray2[1].Trim() + "|";
                    this.double_0 -= Convert.ToDouble(strArray2[1].Trim());
                }
                continue;
            Label_05D0:
                this.string_4 = this.string_4 + "-" + strArray2[1].Trim() + "|";
                this.double_0 -= Convert.ToDouble(strArray2[1].Trim());
                continue;
            Label_0612:;
                string[] strArray5 = label.Text.Trim().Split(new char[] { '#' });
                string[] strArray6 = str2.Trim().Split(new char[] { '#' });
                if (strArray5.Length != strArray6.Length)
                {
                    this.string_4 = this.string_4 + "-" + strArray2[1].Trim() + "|";
                    this.double_0 -= Convert.ToDouble(strArray2[1].Trim());
                }
                else
                {
                    int num9 = 0;
                    for (int k = 0; k < strArray5.Length; k++)
                    {
                        if (strArray5[k].Trim() != "")
                        {
                            for (int m = 0; m < strArray6.Length; m++)
                            {
                                if (!((strArray6[m].Trim() != "") ? !(strArray6[m].Trim() == strArray5[k].Trim()) : true))
                                {
                                    num9++;
                                }
                            }
                        }
                    }
                    if (num9 == strArray5.Length)
                    {
                        this.string_4 = this.string_4 + this.labBFen.Text.Trim() + "|";
                        this.double_0 += Convert.ToDouble(this.labBFen.Text.Trim());
                    }
                    else
                    {
                        this.string_4 = this.string_4 + "-" + strArray2[1].Trim() + "|";
                        this.double_0 -= Convert.ToDouble(strArray2[1].Trim());
                    }
                }
                continue;
            Label_07B7:
                this.string_5 = this.string_5 + "未填写|";
                str2 = "";
                this.string_4 = this.string_4 + "-" + strArray[1].Trim() + "|";
                this.double_0 -= Convert.ToDouble(strArray[1].Trim());
            }
        }

        private void method_28()
        {
            this.string_11 = "系统自动批改";
            string[] strArray = this.ViewState["NoWrite"].ToString().Split(new char[] { '#' });
            string[] strArray2 = this.ViewState["ErrFen"].ToString().Split(new char[] { '#' });
            for (int i = 0; i < this.DataGridC.Rows.Count; i++)
            {
                Label label = (Label) this.DataGridC.Rows[i].FindControl("labCOKAnswer");
                this.string_10 = this.string_10 + label.Text.Trim() + "|";
                RadioButtonList list = (RadioButtonList) this.DataGridC.Rows[i].FindControl("RBLCData");
                switch (list.SelectedIndex)
                {
                    case 0:
                    {
                        this.string_9 = this.string_9 + "Y|";
                        if (label.Text.Trim() == list.SelectedItem.Value.Trim())
                        {
                            break;
                        }
                        this.string_8 = this.string_8 + "-" + strArray2[2].Trim() + "|";
                        this.double_0 -= Convert.ToDouble(strArray2[2].Trim());
                        continue;
                    }
                    case 1:
                    {
                        this.string_9 = this.string_9 + "N|";
                        if (!(label.Text.Trim() == list.SelectedItem.Value.Trim()))
                        {
                            goto Label_028B;
                        }
                        this.string_8 = this.string_8 + this.labCFen.Text.Trim() + "|";
                        this.double_0 += Convert.ToDouble(this.labCFen.Text.Trim());
                        continue;
                    }
                    default:
                    {
                        this.string_9 = this.string_9 + "未填写|";
                        this.string_8 = this.string_8 + "-" + strArray[2].Trim() + "|";
                        this.double_0 -= Convert.ToDouble(strArray[2].Trim());
                        continue;
                    }
                }
                this.string_8 = this.string_8 + this.labCFen.Text.Trim() + "|";
                this.double_0 += Convert.ToDouble(this.labCFen.Text.Trim());
                continue;
            Label_028B:
                this.string_8 = this.string_8 + "-" + strArray2[2].Trim() + "|";
                this.double_0 -= Convert.ToDouble(strArray2[2].Trim());
            }
        }

        private void method_29()
        {
            this.string_15 = "还未批改";
            string str = this.publicFun_0.GetValues("select ParmValue from SysParmInfo where ParmMemo='IsCheckDRubric'", "ParmValue").Trim();
            if (!(str.Trim() == "") ? !(str.Trim() == "N") : false)
            {
                str = "Z";
            }
            else if (str.Trim() == "")
            {
                str = "N";
            }
            for (int i = 0; i < this.DataGridD.Rows.Count; i++)
            {
                int num3;
                string[] strArray3;
                string[] strArray4;
                string[] strArray5;
                string[] strArray6;
                string[] strArray7;
                Label label = (Label) this.DataGridD.Rows[i].FindControl("labDOKAnswer");
                this.string_14 = this.string_14 + label.Text.Trim() + "|";
                TextBox box6 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerA");
                TextBox box5 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerB");
                TextBox box4 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerC");
                TextBox box3 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerD");
                TextBox box2 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerE");
                TextBox box = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerF");
                label.Text = label.Text.Replace("<BR>", "").Replace("<br>", "").Replace("&nbsp;", "");
                if (str == "N")
                {
                    label.Text = label.Text.ToLower();
                    box6.Text = box6.Text.ToLower();
                    box5.Text = box5.Text.ToLower();
                    box4.Text = box4.Text.ToLower();
                    box3.Text = box3.Text.ToLower();
                    box2.Text = box2.Text.ToLower();
                    box.Text = box.Text.ToLower();
                }
                string[] strArray2 = label.Text.Trim().Split(new char[] { '#' });
                int num6 = 0;
                for (int j = 0; j < strArray2.Length; j++)
                {
                    if (strArray2[j].Trim() != "")
                    {
                        num6++;
                    }
                }
                double num4 = Convert.ToDouble(this.labDFen.Text.Trim()) / ((double) num6);
                double num2 = 0.0;
                string str2 = "";
                if (box6.Visible)
                {
                    str2 = str2 + box6.Text.Trim().Replace("'", "＇").Replace('#', '＃').Replace("<", "＜").Replace(">", "＞") + "#";
                }
                if (box5.Visible)
                {
                    str2 = str2 + box5.Text.Trim().Replace("'", "＇").Replace('#', '＃').Replace("<", "＜").Replace(">", "＞") + "#";
                }
                if (box4.Visible)
                {
                    str2 = str2 + box4.Text.Trim().Replace("'", "＇").Replace('#', '＃').Replace("<", "＜").Replace(">", "＞") + "#";
                }
                if (box3.Visible)
                {
                    str2 = str2 + box3.Text.Trim().Replace("'", "＇").Replace('#', '＃').Replace("<", "＜").Replace(">", "＞") + "#";
                }
                if (box2.Visible)
                {
                    str2 = str2 + box2.Text.Trim().Replace("'", "＇").Replace('#', '＃').Replace("<", "＜").Replace(">", "＞") + "#";
                }
                if (box.Visible)
                {
                    str2 = str2 + box.Text.Trim().Replace("'", "＇").Replace('#', '＃').Replace("<", "＜").Replace(">", "＞") + "#";
                }
                if (box5.Text.Trim() == box6.Text.Trim())
                {
                    box5.Text = "";
                }
                if (box4.Text.Trim() == box6.Text.Trim())
                {
                    box4.Text = "";
                }
                if (box3.Text.Trim() == box6.Text.Trim())
                {
                    box3.Text = "";
                }
                if (box2.Text.Trim() == box6.Text.Trim())
                {
                    box2.Text = "";
                }
                if (box.Text.Trim() == box6.Text.Trim())
                {
                    box.Text = "";
                }
                if (box4.Text.Trim() == box5.Text.Trim())
                {
                    box4.Text = "";
                }
                if (box3.Text.Trim() == box5.Text.Trim())
                {
                    box3.Text = "";
                }
                if (box2.Text.Trim() == box5.Text.Trim())
                {
                    box2.Text = "";
                }
                if (box.Text.Trim() == box5.Text.Trim())
                {
                    box.Text = "";
                }
                if (box3.Text.Trim() == box4.Text.Trim())
                {
                    box3.Text = "";
                }
                if (box2.Text.Trim() == box4.Text.Trim())
                {
                    box2.Text = "";
                }
                if (box.Text.Trim() == box4.Text.Trim())
                {
                    box.Text = "";
                }
                if (box2.Text.Trim() == box3.Text.Trim())
                {
                    box2.Text = "";
                }
                if (box.Text.Trim() == box3.Text.Trim())
                {
                    box.Text = "";
                }
                if (box.Text.Trim() == box2.Text.Trim())
                {
                    box.Text = "";
                }
                switch (strArray2.Length)
                {
                    case 1:
                        if (!box6.Visible)
                        {
                            goto Label_127D;
                        }
                        strArray7 = strArray2[0].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                        num3 = 0;
                        goto Label_0860;

                    case 2:
                        if (!box6.Visible)
                        {
                            goto Label_08F7;
                        }
                        strArray7 = strArray2[0].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                        num3 = 0;
                        goto Label_08E6;

                    case 3:
                        if (!box6.Visible)
                        {
                            goto Label_09FE;
                        }
                        strArray7 = strArray2[0].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                        num3 = 0;
                        goto Label_09ED;

                    case 4:
                        if (!box6.Visible)
                        {
                            goto Label_0B83;
                        }
                        strArray7 = strArray2[0].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                        num3 = 0;
                        goto Label_0B72;

                    case 5:
                        if (!box6.Visible)
                        {
                            goto Label_0D86;
                        }
                        strArray7 = strArray2[0].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                        num3 = 0;
                        goto Label_0D75;

                    case 6:
                        if (!box6.Visible)
                        {
                            goto Label_1007;
                        }
                        strArray7 = strArray2[0].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                        num3 = 0;
                        goto Label_0FF6;

                    default:
                        goto Label_127D;
                }
            Label_083A:
                if (strArray7[num3].Trim() == box6.Text.Trim())
                {
                    goto Label_086F;
                }
                num3++;
            Label_0860:
                if (num3 < strArray7.Length)
                {
                    goto Label_083A;
                }
                goto Label_127D;
            Label_086F:
                num2 += num4;
                goto Label_127D;
            Label_08C0:
                if (strArray7[num3].Trim() == box6.Text.Trim())
                {
                    goto Label_08F2;
                }
                num3++;
            Label_08E6:
                if (num3 < strArray7.Length)
                {
                    goto Label_08C0;
                }
                goto Label_08F7;
            Label_08F2:
                num2 += num4;
            Label_08F7:
                if (box5.Visible)
                {
                    strArray6 = strArray2[1].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray6.Length)
                    {
                        if (strArray6[num3].Trim() == box5.Text.Trim())
                        {
                            goto Label_0976;
                        }
                        num3++;
                    }
                }
                goto Label_127D;
            Label_0976:
                num2 += num4;
                goto Label_127D;
            Label_09C7:
                if (strArray7[num3].Trim() == box6.Text.Trim())
                {
                    goto Label_09F9;
                }
                num3++;
            Label_09ED:
                if (num3 < strArray7.Length)
                {
                    goto Label_09C7;
                }
                goto Label_09FE;
            Label_09F9:
                num2 += num4;
            Label_09FE:
                if (box5.Visible)
                {
                    strArray6 = strArray2[1].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray6.Length)
                    {
                        if (strArray6[num3].Trim() == box5.Text.Trim())
                        {
                            goto Label_0A77;
                        }
                        num3++;
                    }
                }
                goto Label_0A7C;
            Label_0A77:
                num2 += num4;
            Label_0A7C:
                if (box4.Visible)
                {
                    strArray5 = strArray2[2].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray5.Length)
                    {
                        if (strArray5[num3].Trim() == box4.Text.Trim())
                        {
                            goto Label_0AFB;
                        }
                        num3++;
                    }
                }
                goto Label_127D;
            Label_0AFB:
                num2 += num4;
                goto Label_127D;
            Label_0B4C:
                if (strArray7[num3].Trim() == box6.Text.Trim())
                {
                    goto Label_0B7E;
                }
                num3++;
            Label_0B72:
                if (num3 < strArray7.Length)
                {
                    goto Label_0B4C;
                }
                goto Label_0B83;
            Label_0B7E:
                num2 += num4;
            Label_0B83:
                if (box5.Visible)
                {
                    strArray6 = strArray2[1].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray6.Length)
                    {
                        if (strArray6[num3].Trim() == box5.Text.Trim())
                        {
                            goto Label_0BFC;
                        }
                        num3++;
                    }
                }
                goto Label_0C01;
            Label_0BFC:
                num2 += num4;
            Label_0C01:
                if (box4.Visible)
                {
                    strArray5 = strArray2[2].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray5.Length)
                    {
                        if (strArray5[num3].Trim() == box4.Text.Trim())
                        {
                            goto Label_0C7A;
                        }
                        num3++;
                    }
                }
                goto Label_0C7F;
            Label_0C7A:
                num2 += num4;
            Label_0C7F:
                if (box3.Visible)
                {
                    strArray4 = strArray2[3].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray4.Length)
                    {
                        if (strArray4[num3].Trim() == box3.Text.Trim())
                        {
                            goto Label_0CFE;
                        }
                        num3++;
                    }
                }
                goto Label_127D;
            Label_0CFE:
                num2 += num4;
                goto Label_127D;
            Label_0D4F:
                if (strArray7[num3].Trim() == box6.Text.Trim())
                {
                    goto Label_0D81;
                }
                num3++;
            Label_0D75:
                if (num3 < strArray7.Length)
                {
                    goto Label_0D4F;
                }
                goto Label_0D86;
            Label_0D81:
                num2 += num4;
            Label_0D86:
                if (box5.Visible)
                {
                    strArray6 = strArray2[1].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray6.Length)
                    {
                        if (strArray6[num3].Trim() == box5.Text.Trim())
                        {
                            goto Label_0DFF;
                        }
                        num3++;
                    }
                }
                goto Label_0E04;
            Label_0DFF:
                num2 += num4;
            Label_0E04:
                if (box4.Visible)
                {
                    strArray5 = strArray2[2].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray5.Length)
                    {
                        if (strArray5[num3].Trim() == box4.Text.Trim())
                        {
                            goto Label_0E7D;
                        }
                        num3++;
                    }
                }
                goto Label_0E82;
            Label_0E7D:
                num2 += num4;
            Label_0E82:
                if (box3.Visible)
                {
                    strArray4 = strArray2[3].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray4.Length)
                    {
                        if (strArray4[num3].Trim() == box3.Text.Trim())
                        {
                            goto Label_0EFB;
                        }
                        num3++;
                    }
                }
                goto Label_0F00;
            Label_0EFB:
                num2 += num4;
            Label_0F00:
                if (box2.Visible)
                {
                    strArray3 = strArray2[4].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray3.Length)
                    {
                        if (strArray3[num3].Trim() == box2.Text.Trim())
                        {
                            goto Label_0F7F;
                        }
                        num3++;
                    }
                }
                goto Label_127D;
            Label_0F7F:
                num2 += num4;
                goto Label_127D;
            Label_0FD0:
                if (strArray7[num3].Trim() == box6.Text.Trim())
                {
                    goto Label_1002;
                }
                num3++;
            Label_0FF6:
                if (num3 < strArray7.Length)
                {
                    goto Label_0FD0;
                }
                goto Label_1007;
            Label_1002:
                num2 += num4;
            Label_1007:
                if (box5.Visible)
                {
                    strArray6 = strArray2[1].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray6.Length)
                    {
                        if (strArray6[num3].Trim() == box5.Text.Trim())
                        {
                            goto Label_1080;
                        }
                        num3++;
                    }
                }
                goto Label_1085;
            Label_1080:
                num2 += num4;
            Label_1085:
                if (box4.Visible)
                {
                    strArray5 = strArray2[2].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray5.Length)
                    {
                        if (strArray5[num3].Trim() == box4.Text.Trim())
                        {
                            goto Label_10FE;
                        }
                        num3++;
                    }
                }
                goto Label_1103;
            Label_10FE:
                num2 += num4;
            Label_1103:
                if (box3.Visible)
                {
                    strArray4 = strArray2[3].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray4.Length)
                    {
                        if (strArray4[num3].Trim() == box3.Text.Trim())
                        {
                            goto Label_117C;
                        }
                        num3++;
                    }
                }
                goto Label_1181;
            Label_117C:
                num2 += num4;
            Label_1181:
                if (box2.Visible)
                {
                    strArray3 = strArray2[4].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    num3 = 0;
                    while (num3 < strArray3.Length)
                    {
                        if (strArray3[num3].Trim() == box2.Text.Trim())
                        {
                            goto Label_11FA;
                        }
                        num3++;
                    }
                }
                goto Label_11FF;
            Label_11FA:
                num2 += num4;
            Label_11FF:
                if (box.Visible)
                {
                    string[] strArray = strArray2[5].Trim().Replace(":/", "〓").Split(new char[] { '〓' });
                    for (num3 = 0; num3 < strArray.Length; num3++)
                    {
                        if (strArray[num3].Trim() == box.Text.Trim())
                        {
                            goto Label_1278;
                        }
                    }
                }
                goto Label_127D;
            Label_1278:
                num2 += num4;
            Label_127D:
                if (!(str2.Trim() != ""))
                {
                    this.string_13 = this.string_13 + "未填写|";
                    this.string_12 = this.string_12 + "0|";
                }
                else
                {
                    str2 = str2.Replace("|", "｜");
                    str2 = str2.Substring(0, str2.Length - 1);
                    this.string_13 = this.string_13 + str2 + "|";
                    this.string_12 = this.string_12 + num2.ToString("0.00") + "|";
                    this.double_0 += Convert.ToDouble(num2.ToString("0.00"));
                }
            }
        }

        private void method_3()
        {
            string cmdText = "select RubricTypeName  from PaperInfo where ID='" + this.intPaperID + "'";
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlCommand command = new SqlCommand(cmdText, connection);
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                string[] strArray = reader["RubricTypeName"].ToString().Split(new char[] { '#' });
                for (int i = 0; i < strArray.Length; i++)
                {
                    switch (i)
                    {
                        case 0:
                            this.labATitle.Text = strArray[i].Trim();
                            break;

                        case 1:
                            this.labBTitle.Text = strArray[i].Trim();
                            break;

                        case 2:
                            this.labCTitle.Text = strArray[i].Trim();
                            break;

                        case 3:
                            this.labDTitle.Text = strArray[i].Trim();
                            break;

                        case 4:
                            this.labETitle.Text = strArray[i].Trim();
                            break;

                        case 5:
                            this.labFTitle.Text = strArray[i].Trim();
                            break;

                        case 6:
                            this.labGTitle.Text = strArray[i].Trim();
                            break;

                        case 7:
                            this.labHTitle.Text = strArray[i].Trim();
                            break;

                        case 8:
                            this.labITitle.Text = strArray[i].Trim();
                            break;

                        case 9:
                            this.labJTitle.Text = strArray[i].Trim();
                            break;
                    }
                }
            }
            if (this.labATitle.Text.Trim() == "")
            {
                this.labATitle.Text = "单选题";
            }
            if (this.labBTitle.Text.Trim() == "")
            {
                this.labBTitle.Text = "多选题";
            }
            if (this.labCTitle.Text.Trim() == "")
            {
                this.labCTitle.Text = "判断题";
            }
            if (this.labDTitle.Text.Trim() == "")
            {
                this.labDTitle.Text = "填空题";
            }
            if (this.labETitle.Text.Trim() == "")
            {
                this.labETitle.Text = "简答题";
            }
            if (this.labFTitle.Text.Trim() == "")
            {
                this.labFTitle.Text = "作文题";
            }
            if (this.labGTitle.Text.Trim() == "")
            {
                this.labGTitle.Text = "论述题";
            }
            if (this.labHTitle.Text.Trim() == "")
            {
                this.labHTitle.Text = "分析题";
            }
            if (this.labITitle.Text.Trim() == "")
            {
                this.labITitle.Text = "操作题";
            }
            if (this.labJTitle.Text.Trim() == "")
            {
                this.labJTitle.Text = "综合题";
            }
            reader.Close();
            command.Dispose();
            connection.Close();
            connection.Dispose();
        }

        private void method_30()
        {
            this.string_19 = "还未批改";
            for (int i = 0; i < this.DataGridE.Rows.Count; i++)
            {
                Label label = (Label) this.DataGridE.Rows[i].FindControl("labEOKAnswer");
                this.string_18 = this.string_18 + label.Text.Trim() + "|";
                TextBox box = (TextBox) this.DataGridE.Rows[i].FindControl("txtEAnswer");
                string[] strArray = label.Text.Trim().Split(new char[] { ',' });
                int num5 = 0;
                for (int j = 0; j < strArray.Length; j++)
                {
                    if (strArray[j].Trim() != "")
                    {
                        num5++;
                    }
                }
                if (num5 == 0)
                {
                    num5 = 1;
                }
                double num4 = Convert.ToDouble(this.labEFen.Text.Trim()) / ((double) num5);
                double num2 = 0.0;
                if (box.Text.Trim() == "")
                {
                    this.string_17 = this.string_17 + "未填写|";
                    this.string_16 = this.string_16 + "0|";
                }
                else
                {
                    for (int k = 0; k < strArray.Length; k++)
                    {
                        if ((strArray[k].Trim() != "") && (box.Text.Trim().IndexOf(strArray[k].Trim()) != -1))
                        {
                            num2 += num4;
                        }
                    }
                    this.string_16 = this.string_16 + num2.ToString("0.00") + "|";
                    this.double_0 += Convert.ToDouble(num2.ToString("0.00"));
                    string s = box.Text.Trim().Replace("|", "｜").Replace("'", "＇");
                    s = base.Server.HtmlEncode(s).Replace("\n", " <br/>").Replace(" ", " ");
                    s = base.Server.HtmlDecode(s);
                    this.string_17 = this.string_17 + s + "|";
                }
            }
        }

        private void method_31()
        {
            this.string_23 = "还未批改";
            for (int i = 0; i < this.DataGridF.Rows.Count; i++)
            {
                Label label = (Label) this.DataGridF.Rows[i].FindControl("labFOKAnswer");
                this.string_22 = this.string_22 + label.Text.Trim() + "|";
                TextBox box = (TextBox) this.DataGridF.Rows[i].FindControl("txtFAnswer");
                if (!(box.Text.Trim() == ""))
                {
                    string s = box.Text.Trim().Replace("|", "｜").Replace("'", "＇");
                    s = base.Server.HtmlEncode(s).Replace("\n", " <br/>").Replace(" ", " ");
                    s = base.Server.HtmlDecode(s);
                    this.string_21 = this.string_21 + s + "|";
                }
                else
                {
                    this.string_21 = this.string_21 + "未填写|";
                }
                this.string_20 = this.string_20 + " |";
            }
        }

        private void method_32()
        {
            this.string_27 = "还未批改";
            for (int i = 0; i < this.DataGridG.Rows.Count; i++)
            {
                Label label = (Label) this.DataGridG.Rows[i].FindControl("labGOKAnswer");
                this.string_26 = this.string_26 + label.Text.Trim() + "|";
                TextBox box = (TextBox) this.DataGridG.Rows[i].FindControl("txtGAnswer");
                string[] strArray = label.Text.Trim().Split(new char[] { ',' });
                int num5 = 0;
                for (int j = 0; j < strArray.Length; j++)
                {
                    if (strArray[j].Trim() != "")
                    {
                        num5++;
                    }
                }
                if (num5 == 0)
                {
                    num5 = 1;
                }
                double num4 = Convert.ToDouble(this.labGFen.Text.Trim()) / ((double) num5);
                double num3 = 0.0;
                if (box.Text.Trim() != "")
                {
                    for (int k = 0; k < strArray.Length; k++)
                    {
                        if ((strArray[k].Trim() != "") && (box.Text.Trim().IndexOf(strArray[k].Trim()) != -1))
                        {
                            num3 += num4;
                        }
                    }
                    this.string_24 = this.string_24 + num3.ToString("0.00") + "|";
                    this.double_0 += Convert.ToDouble(num3.ToString("0.00"));
                    string s = box.Text.Trim().Replace("|", "｜").Replace("'", "＇");
                    s = base.Server.HtmlEncode(s).Replace("\n", " <br/>").Replace(" ", " ");
                    s = base.Server.HtmlDecode(s);
                    this.string_25 = this.string_25 + s + "|";
                }
                else
                {
                    this.string_25 = this.string_25 + "未填写|";
                    this.string_24 = this.string_24 + "0|";
                }
            }
        }

        private void method_33()
        {
            this.string_30 = "还未批改";
            for (int i = 0; i < this.DataGridH.Rows.Count; i++)
            {
                Label label = (Label) this.DataGridH.Rows[i].FindControl("labHOKAnswer");
                this.string_31 = this.string_31 + label.Text.Trim() + "|";
                TextBox box = (TextBox) this.DataGridH.Rows[i].FindControl("txtHAnswer");
                string[] strArray = label.Text.Trim().Split(new char[] { ',' });
                int num5 = 0;
                for (int j = 0; j < strArray.Length; j++)
                {
                    if (strArray[j].Trim() != "")
                    {
                        num5++;
                    }
                }
                if (num5 == 0)
                {
                    num5 = 1;
                }
                double num4 = Convert.ToDouble(this.labHFen.Text.Trim()) / ((double) num5);
                double num2 = 0.0;
                if (box.Text.Trim() == "")
                {
                    this.string_29 = this.string_29 + "未填写|";
                    this.string_28 = this.string_28 + "0|";
                }
                else
                {
                    for (int k = 0; k < strArray.Length; k++)
                    {
                        if ((strArray[k].Trim() != "") && (box.Text.Trim().IndexOf(strArray[k].Trim()) != -1))
                        {
                            num2 += num4;
                        }
                    }
                    this.string_28 = this.string_28 + num2.ToString("0.00") + "|";
                    this.double_0 += Convert.ToDouble(num2.ToString("0.00"));
                    string s = box.Text.Trim().Replace("|", "｜").Replace("'", "＇");
                    s = base.Server.HtmlEncode(s).Replace("\n", " <br/>").Replace(" ", " ");
                    s = base.Server.HtmlDecode(s);
                    this.string_29 = this.string_29 + s + "|";
                }
            }
        }

        private void method_34()
        {
            this.string_33 = "还未批改";
            for (int i = 0; i < this.DataGridI.Rows.Count; i++)
            {
                Label label = (Label) this.DataGridI.Rows[i].FindControl("labIOKAnswer");
                this.string_34 = this.string_34 + label.Text.Trim() + "|";
                this.string_32 = this.string_32 + "0|";
            }
        }

        private void method_35()
        {
            this.string_38 = "还未批改";
            string str = this.publicFun_0.GetValues("select ParmValue from SysParmInfo where ParmMemo='IsCheckJRubric'", "ParmValue").Trim();
            if (!(str.Trim() == "") ? !(str.Trim() == "N") : false)
            {
                str = "Z";
            }
            else if (str.Trim() == "")
            {
                str = "N";
            }
            for (int i = 0; i < this.DataGridJ.Rows.Count; i++)
            {
                Label label = (Label) this.DataGridJ.Rows[i].FindControl("labJOKAnswer");
                this.string_37 = this.string_37 + label.Text.Trim() + "|";
                TextBox box = (TextBox) this.DataGridJ.Rows[i].FindControl("txtJAnswer");
                if (!(box.Text.Trim() == ""))
                {
                    string str2 = box.Text.Trim().Replace("|", "｜").Replace("'", "＇");
                    this.string_36 = this.string_36 + str2 + "|";
                }
                else
                {
                    this.string_36 = this.string_36 + "未填写|";
                }
                if (box.Text.Trim() != "")
                {
                    int length = 0;
                    double num5 = 0.0;
                    double num4 = 0.0;
                    string[] strArray3 = this.labJFen.Text.Split(new char[] { '_' });
                    string[] strArray = label.Text.Split(new char[] { '#' });
                    string[] strArray2 = box.Text.Trim().Replace("|", "｜").Replace("'", "＇").Split(new char[] { '#' });
                    if (strArray2.Length < strArray.Length)
                    {
                        length = strArray2.Length;
                    }
                    else
                    {
                        length = strArray.Length;
                    }
                    if (!(strArray3[i].Trim() == ""))
                    {
                        num5 = Convert.ToDouble(strArray3[i].Trim());
                    }
                    else
                    {
                        num5 = 0.0;
                    }
                    num4 = 0.0;
                    for (int j = 0; j < length; j++)
                    {
                        if (str == "N")
                        {
                            if ((strArray[j].Trim().ToUpper() != "") && (strArray2[j].ToUpper().Trim() == strArray[j].Trim().ToUpper()))
                            {
                                num4 += num5;
                            }
                        }
                        else if (!((strArray[j].Trim() != "") ? !(strArray2[j].Trim() == strArray[j].Trim()) : true))
                        {
                            num4 += num5;
                        }
                    }
                    this.string_35 = this.string_35 + num4.ToString("0.00") + "|";
                    this.double_0 += Convert.ToDouble(num4.ToString("0.00"));
                }
                else
                {
                    this.string_35 = this.string_35 + "0|";
                }
            }
        }

        private void method_36()
        {
            if (this.txtHideComm.Value.Trim() == "CheckExam")
            {
                this.labCheckRubricInfo.Text = "";
                int num = 0;
                string str = "0";
                try
                {
                    if (this.DataGridA.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridA.Rows.Count)
                        {
                            RadioButtonList list3 = (RadioButtonList) this.DataGridA.Rows[num].FindControl("RBLAData");
                            if ((list3.SelectedIndex == -1) && !((this.txtCheckID.Value != num.ToString()) ? (Convert.ToInt32(this.txtCheckID.Value) >= num) : true))
                            {
                                goto Label_00F9;
                            }
                            num++;
                        }
                        if (num == this.DataGridA.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    goto Label_0134;
                Label_00F9:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "单选题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_0134:
                    if (this.DataGridB.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridB.Rows.Count)
                        {
                            CheckBoxList list2 = (CheckBoxList) this.DataGridB.Rows[num].FindControl("CBLBData");
                            if ((list2.SelectedIndex == -1) && ((this.txtCheckID.Value != num.ToString()) && (Convert.ToInt32(this.txtCheckID.Value) < num)))
                            {
                                goto Label_0B2F;
                            }
                            num++;
                        }
                        if (num == this.DataGridB.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    if (this.DataGridC.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridC.Rows.Count)
                        {
                            RadioButtonList list = (RadioButtonList) this.DataGridC.Rows[num].FindControl("RBLCData");
                            if ((list.SelectedIndex == -1) && ((this.txtCheckID.Value != num.ToString()) && (Convert.ToInt32(this.txtCheckID.Value) < num)))
                            {
                                goto Label_0AF7;
                            }
                            num++;
                        }
                        if (num == this.DataGridC.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    if (this.DataGridD.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridD.Rows.Count)
                        {
                            TextBox box11 = (TextBox) this.DataGridD.Rows[num].FindControl("txtDAnswerA");
                            TextBox box9 = (TextBox) this.DataGridD.Rows[num].FindControl("txtDAnswerB");
                            TextBox box10 = (TextBox) this.DataGridD.Rows[num].FindControl("txtDAnswerC");
                            TextBox box6 = (TextBox) this.DataGridD.Rows[num].FindControl("txtDAnswerD");
                            TextBox box7 = (TextBox) this.DataGridD.Rows[num].FindControl("txtDAnswerE");
                            TextBox box8 = (TextBox) this.DataGridD.Rows[num].FindControl("txtDAnswerF");
                            if ((((((box11.Text.Trim() == "") && (box9.Text.Trim() == "")) && ((box10.Text.Trim() == "") && (box6.Text.Trim() == ""))) && (box7.Text.Trim() == "")) && (box8.Text.Trim() == "")) && !((this.txtCheckID.Value != num.ToString()) ? (Convert.ToInt32(this.txtCheckID.Value) >= num) : true))
                            {
                                goto Label_04B0;
                            }
                            num++;
                        }
                        if (num == this.DataGridD.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    goto Label_04EB;
                Label_04B0:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "填空题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_04EB:
                    if (this.DataGridE.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridE.Rows.Count)
                        {
                            TextBox box5 = (TextBox) this.DataGridE.Rows[num].FindControl("txtEAnswer");
                            if ((box5.Text.Trim() == "") && ((this.txtCheckID.Value != num.ToString()) && (Convert.ToInt32(this.txtCheckID.Value) < num)))
                            {
                                goto Label_0ABF;
                            }
                            num++;
                        }
                        if (num == this.DataGridE.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    if (this.DataGridF.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridF.Rows.Count)
                        {
                            TextBox box4 = (TextBox) this.DataGridF.Rows[num].FindControl("txtFAnswer");
                            if ((box4.Text.Trim() == "") && !((this.txtCheckID.Value != num.ToString()) ? (Convert.ToInt32(this.txtCheckID.Value) >= num) : true))
                            {
                                goto Label_0A84;
                            }
                            num++;
                        }
                        if (num == this.DataGridF.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    if (this.DataGridG.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridG.Rows.Count)
                        {
                            TextBox box3 = (TextBox) this.DataGridG.Rows[num].FindControl("txtGAnswer");
                            if ((box3.Text.Trim() == "") && ((this.txtCheckID.Value != num.ToString()) && (Convert.ToInt32(this.txtCheckID.Value) < num)))
                            {
                                goto Label_0757;
                            }
                            num++;
                        }
                        if (num == this.DataGridG.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    goto Label_0792;
                Label_0757:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "论述题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_0792:
                    if (this.DataGridH.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridH.Rows.Count)
                        {
                            TextBox box2 = (TextBox) this.DataGridH.Rows[num].FindControl("txtHAnswer");
                            if ((box2.Text.Trim() == "") && !((this.txtCheckID.Value != num.ToString()) ? (Convert.ToInt32(this.txtCheckID.Value) >= num) : true))
                            {
                                goto Label_0A49;
                            }
                            num++;
                        }
                        if (num == this.DataGridH.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    if (this.DataGridJ.Visible)
                    {
                        num = 0;
                        while (num < this.DataGridJ.Rows.Count)
                        {
                            TextBox box = (TextBox) this.DataGridJ.Rows[num].FindControl("txtJAnswer");
                            if (!(box.Text.Trim() == ""))
                            {
                                Label label = (Label) this.DataGridJ.Rows[num].FindControl("labJOKAnswer");
                                if (box.Text.Trim().Split(new char[] { '#' }).Length != label.Text.Split(new char[] { '#' }).Length)
                                {
                                    goto Label_09D3;
                                }
                            }
                            else if (!((this.txtCheckID.Value != num.ToString()) ? (Convert.ToInt32(this.txtCheckID.Value) >= num) : true))
                            {
                                goto Label_0A0E;
                            }
                            num++;
                        }
                        if (num == this.DataGridJ.Rows.Count)
                        {
                            this.txtCheckID.Value = "-1";
                        }
                    }
                    if (this.labCheckRubricInfo.Text.Trim() == "")
                    {
                        this.labCheckRubricInfo.Text = "试卷答题全部完成！";
                    }
                    return;
                Label_09D3:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "综合题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_0A0E:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "综合题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_0A49:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "分析题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_0A84:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "作文题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_0ABF:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "简答题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_0AF7:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "判断题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                    return;
                Label_0B2F:
                    str = Convert.ToString((int) (num + 1));
                    this.labCheckRubricInfo.Text = "多选题:第(" + str + ")题未完成！";
                    this.txtCheckID.Value = num.ToString();
                }
                catch
                {
                }
            }
        }

        private void method_4()
        {
            string str = "A";
            string str3 = "";
            string str4 = "";
            string str5 = "";
            string str6 = "";
            string str7 = "";
            string str8 = "";
            string str9 = "";
            string str10 = "";
            string str11 = "";
            string str12 = "";
            string str13 = "";
            string str14 = "";
            string str15 = "";
            string str16 = "";
            this.ViewState["NoWrite"] = "";
            this.ViewState["ErrFen"] = "";
            this.ViewState["ExamName"] = "";
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlCommand command = new SqlCommand(string.Concat(new object[] { "select a.EnterTime,a.PaperEndTime,a.NoWriteFen,a.ErrorFen,a.IsShow,a.StartIP,a.EndIP,a.Flag,a.MemberFen,b.SortInfo,a.PaperStatus,a.ExamName,a.SubjectName,a.PaperFen,a.ExamTime,a.RubricDist,a.FenDist,a.MemoDist,b.RubricS,b.RubricD,b.RubricB,b.RubricF,b.RubricA,b.RubricC,b.RubricT,b.RubricAN,b.RubricO ,b.RubricJ,c.LastTime from PaperInfo a ,PaperData b,ExamUser c where c.UserCode=b.UserCode and c.PaperID=a.ID and  b.UserCode='", this.httpCookie_0.Value, "' and a.ID=b.PaperID and a.ID=", this.intPaperID }), connection);
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                this.ViewState["ExamType"] = reader["PaperStatus"].ToString();
                this.labExamName.Text = reader["ExamName"].ToString();
                this.labPaperFen.Text = reader["PaperFen"].ToString();
                this.labExamTime.Text = reader["ExamTime"].ToString();
                if (this.labExamName.Text.Trim().Length > 0x12)
                {
                    this.labExamName.Text = this.labExamName.Text.Substring(0, 0x12) + "…";
                }
                this.ViewState["NoWrite"] = reader["NoWriteFen"].ToString();
                this.ViewState["ErrFen"] = reader["ErrorFen"].ToString();
                this.ViewState["ExamName"] = reader["ExamName"].ToString();
                if (!(reader["IsShow"].ToString() != "Y"))
                {
                    this.ViewState["IEBack"] = "0";
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BBackA", "window.onblur=auto_submit;", true);
                    this.ViewState["IEBack"] = "1";
                }
                int num2 = 0;
                if (!(reader["EnterTime"].ToString().Trim() == "A"))
                {
                    TimeSpan span = (TimeSpan) (Convert.ToDateTime(reader["PaperEndTime"].ToString()) - DateTime.Now);
                    num2 = Convert.ToInt32(span.TotalMinutes);
                }
                else
                {
                    num2 = Convert.ToInt32(reader["LastTime"].ToString().Trim());
                }
                if (num2 <= 0)
                {
                    num2 = 1;
                }
                this.SumTime.Value = num2.ToString();
                this.ViewState["PaperSumTime"] = this.SumTime.Value;
                this.StartTime.Value = DateTime.Now.ToLongTimeString();
                this.strStartTime = this.StartTime.Value;
                this.EndTime.Value = DateTime.Now.AddMinutes(Convert.ToDouble(this.SumTime.Value)).ToLongTimeString();
                this.ViewState["TmpStartTime"] = this.StartTime.Value;
                this.ViewState["TmpEndTime"] = this.EndTime.Value;
                string userIP = Convert.ToString(base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
                string startIP = reader["StartIP"].ToString();
                string endIP = reader["EndIP"].ToString();
                switch (userIP)
                {
                    case "":
                    case null:
                        userIP = Convert.ToString(base.Request.ServerVariables["REMOTE_ADDR"]);
                        break;
                }
                if (this.publicFun_0.CheckIP(userIP, startIP, endIP))
                {
                    str = reader["Flag"].ToString();
                    str3 = reader["RubricDist"].ToString();
                    str4 = reader["FenDist"].ToString();
                    str5 = reader["MemoDist"].ToString();
                    str6 = reader["SortInfo"].ToString();
                    str7 = reader["RubricS"].ToString();
                    str8 = reader["RubricD"].ToString();
                    str9 = reader["RubricB"].ToString();
                    str10 = reader["RubricF"].ToString();
                    str11 = reader["RubricA"].ToString();
                    str12 = reader["RubricC"].ToString();
                    str13 = reader["RubricT"].ToString();
                    str14 = reader["RubricAN"].ToString();
                    str15 = reader["RubricO"].ToString();
                    str16 = reader["RubricJ"].ToString();
                    this.ViewState["ExamType"] = reader["PaperStatus"].ToString();
                    reader.Close();
                    command.Dispose();
                    connection.Close();
                    connection.Dispose();
                    string str17 = "";
                    str17 = "<table   borderColor='#cccccc' cellSpacing='0' borderColorDark='#cccccc' cellPadding='0' width='100%' align='center' border='1' style='border-style:Solid;'>";
                    str17 = str17 + "<tr height='30'><td align='left' bgcolor='#5AA6E4'>";
                    string[] strArray = str3.Split(new char[] { '#' });
                    string[] strArray3 = str4.Split(new char[] { '#' });
                    string[] strArray4 = str5.Split(new char[] { '#' });
                    string[] strArray5 = str6.Split(new char[] { '#' });
                    int num = 0;
                    if (strArray.Length <= 1)
                    {
                        ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BNoReadData", "alert('对不起，没有读取到相关数据！');window.close();", true);
                    }
                    else
                    {
                        if (strArray[0] != "0")
                        {
                            num++;
                            this.labATitle.Visible = true;
                            this.labATitle.Text = str17 + "<font color='#ffffff'><a name='RubricTypeA'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labATitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[0] + "</font>题,每题<font color='#ff0000'>" + strArray3[0] + "</font>分,说明:" + strArray4[0] + ")</font></td></tr></table><br>";
                            this.labAFen.Text = strArray3[0].Trim();
                            this.method_5(str7, strArray5[0], str);
                        }
                        if (strArray[1] != "0")
                        {
                            num++;
                            this.labBTitle.Visible = true;
                            this.labBTitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeB'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labBTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[1] + "</font>题,每题<font color='#ff0000'>" + strArray3[1] + "</font>分,说明:" + strArray4[1] + ")</font></td></tr></table><br>";
                            this.labBFen.Text = strArray3[1].Trim();
                            this.method_6(str8, strArray5[1], str);
                        }
                        if (strArray[2] != "0")
                        {
                            num++;
                            this.labCTitle.Visible = true;
                            this.labCTitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeC'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labCTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[2] + "</font>题,每题<font color='#ff0000'>" + strArray3[2] + "</font>分,说明:" + strArray4[2] + ")</font></td></tr></table><br>";
                            this.labCFen.Text = strArray3[2].Trim();
                            this.method_7(str9, strArray5[2]);
                        }
                        if (strArray[3] != "0")
                        {
                            num++;
                            this.labDTitle.Visible = true;
                            this.labDTitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeD'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labDTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[3] + "</font>题,每题<font color='#ff0000'>" + strArray3[3] + "</font>分,说明:" + strArray4[3] + ")</font></td></tr></table><br>";
                            this.labDFen.Text = strArray3[3].Trim();
                            this.method_8(str10, strArray5[3]);
                        }
                        if (strArray[4] != "0")
                        {
                            num++;
                            this.labETitle.Visible = true;
                            this.labETitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeE'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labETitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[4] + "</font>题,每题<font color='#ff0000'>" + strArray3[4] + "</font>分,说明:" + strArray4[4] + ")</font></td></tr></table><br>";
                            this.labEFen.Text = strArray3[4].Trim();
                            this.method_9(str11, strArray5[4]);
                        }
                        if (strArray[5] != "0")
                        {
                            num++;
                            this.labFTitle.Visible = true;
                            this.labFTitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeF'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labFTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[5] + "</font>题,每题<font color='#ff0000'>" + strArray3[5] + "</font>分,说明:" + strArray4[5] + ")</font></td></tr></table><br>";
                            this.labFFen.Text = strArray3[5].Trim();
                            this.method_10(str12, strArray5[5]);
                        }
                        if (strArray[6] != "0")
                        {
                            num++;
                            this.labGTitle.Visible = true;
                            this.labGTitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeG'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labGTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[6] + "</font>题,每题<font color='#ff0000'>" + strArray3[6] + "</font>分,说明:" + strArray4[6] + ")</font></td></tr></table><br>";
                            this.labGFen.Text = strArray3[6].Trim();
                            this.method_11(str13, strArray5[6]);
                        }
                        if (strArray[7] != "0")
                        {
                            num++;
                            this.labHTitle.Visible = true;
                            this.labHTitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeH'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labHTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[7] + "</font>题,每题<font color='#ff0000'>" + strArray3[7] + "</font>分,说明:" + strArray4[7] + ")</font></td></tr></table><br>";
                            this.labHFen.Text = strArray3[7].Trim();
                            this.method_12(str14, strArray5[7]);
                        }
                        if (strArray[8] != "0")
                        {
                            num++;
                            this.labITitle.Visible = true;
                            this.labITitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeI'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labITitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[8] + "</font>题,每题<font color='#ff0000'>" + strArray3[8] + "</font>分,说明:" + strArray4[8] + ")</font></td></tr></table><br>";
                            this.labIFen.Text = strArray3[8].Trim();
                            this.method_13(str15, strArray5[8]);
                        }
                        if (strArray[9] != "0")
                        {
                            num++;
                            this.labJTitle.Visible = true;
                            this.labJTitle.Text = "<br><br>" + str17 + "<font color='#ffffff'><a name='RubricTypeJ'></a>&nbsp;&nbsp;<b>" + this.method_2(num) + this.labJTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + Convert.ToString(strArray[9].ToString().Split(new char[] { '_' }).Length) + "</font>题,每题<font color='#ff0000'>" + strArray3[9].Replace("_", " /") + "</font>分,说明:" + strArray4[9].Replace("＃", "#") + ")</font></td></tr></table><br>";
                            this.labJFen.Text = strArray3[9].Trim();
                            this.method_14(str16, strArray5[9]);
                        }
                    }
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCheckIP", "alert('您的IP被拒绝考试,系统管理员设置了此份试卷考试的IP范围！');window.close();", true);
                }
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BNoData", "alert('对不起，没有读取到相关数据！');window.close();", true);
            }
        }

        private void method_5(string string_39, string string_40, string string_41)
        {
            try
            {
                this.DataGridA.Visible = true;
                int num = 0;
                string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo where RubricType='A'";
                selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
                SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
                DataSet dataSet = new DataSet();
                adapter.Fill(dataSet, "SRubric");
                this.DataGridA.DataSource = dataSet.Tables["SRubric"].DefaultView;
                this.DataGridA.DataBind();
                Random random = new Random();
                for (int i = 0; i < this.DataGridA.Rows.Count; i++)
                {
                    string str5 = "";
                    num++;
                    if (i != 0)
                    {
                        this.labRubricListAID.Text = string.Concat(new object[] { this.labRubricListAID.Text, "<a href='#A", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                    }
                    else
                    {
                        this.labRubricListAID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeA'>", this.publicFun_0.GetRubricType("A", this.intPaperID.ToString()), "</a>:</B> <a href='#A", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                    }
                    string[] strArray2 = dataSet.Tables["SRubric"].Rows[i]["OptionAnswer"].ToString().Replace("####", "#").Replace("###", "#").Replace("##", "#").Split(new char[] { '#' });
                    Label label = (Label) this.DataGridA.Rows[i].FindControl("labADataTitle");
                    Label label2 = (Label) this.DataGridA.Rows[i].FindControl("labAOKAnswer");
                    if (!(this.httpCookie_1.Value == "黎光宇"))
                    {
                        label2.Visible = false;
                    }
                    else
                    {
                        label2.Visible = true;
                        label2.ForeColor = Color.White;
                    }
                    label.Text = string.Concat(new object[] { "<a title='标记此题'  href='#A", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListAID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label.Text.ToString(), "<a name='A", i.ToString(), "'></a>" });
                    RadioButtonList list = (RadioButtonList) this.DataGridA.Rows[i].FindControl("RBLAData");
                    list.Attributes.Add("onclick", "javascript:WriteRBL('labRubricListAID','" + num + "')");
                    for (int j = 0; j < strArray2.Length; j++)
                    {
                        if (!(strArray2[j].Trim() != ""))
                        {
                            continue;
                        }
                        switch (j)
                        {
                            case 0:
                                str5 = "A";
                                break;

                            case 1:
                                str5 = "B";
                                break;

                            case 2:
                                str5 = "C";
                                break;

                            case 3:
                                str5 = "D";
                                break;

                            case 4:
                                str5 = "E";
                                break;

                            case 5:
                                str5 = "F";
                                break;
                        }
                        ListItem item2 = new ListItem(strArray2[j].Replace("＃", "#"), str5);
                        list.Items.Add(item2);
                    }
                    if ((this.httpCookie_1.Value != "黎光宇") && !(!(string_41.Trim() == "B") ? !(string_41.Trim() == "D") : false))
                    {
                        for (int m = 0; m < 3; m++)
                        {
                            int index = random.Next(list.Items.Count);
                            string text = "";
                            string str4 = "";
                            text = list.Items[index].Text;
                            str4 = list.Items[index].Value;
                            list.Items.RemoveAt(index);
                            ListItem item = new ListItem(text, str4);
                            list.Items.Insert(0, item);
                        }
                    }
                    for (int k = 0; k < list.Items.Count; k++)
                    {
                        switch (k)
                        {
                            case 0:
                                list.Items[k].Text = "A、" + list.Items[k].Text;
                                break;

                            case 1:
                                list.Items[k].Text = "B、" + list.Items[k].Text;
                                break;

                            case 2:
                                list.Items[k].Text = "C、" + list.Items[k].Text;
                                break;

                            case 3:
                                list.Items[k].Text = "D、" + list.Items[k].Text;
                                break;

                            case 4:
                                list.Items[k].Text = "E、" + list.Items[k].Text;
                                break;

                            case 5:
                                list.Items[k].Text = "F、" + list.Items[k].Text;
                                break;
                        }
                    }
                }
                adapter.Dispose();
                dataSet.Clear();
                dataSet.Dispose();
                selectConnection.Close();
                selectConnection.Dispose();
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BRubricA", "alert('单选题显示出错,可能有错误格式的试题！')", true);
            }
        }

        private void method_6(string string_39, string string_40, string string_41)
        {
            try
            {
                this.DataGridB.Visible = true;
                string str = "";
                int num = 0;
                string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo where RubricType='B'";
                selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
                SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
                DataSet dataSet = new DataSet();
                adapter.Fill(dataSet, "DRubric");
                this.DataGridB.DataSource = dataSet.Tables["DRubric"].DefaultView;
                this.DataGridB.DataBind();
                Random random = new Random();
                for (int i = 0; i < this.DataGridB.Rows.Count; i++)
                {
                    num++;
                    if (i == 0)
                    {
                        this.labRubricListBID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeB'>", this.publicFun_0.GetRubricType("B", this.intPaperID.ToString()), "</a>:</B> <a href='#B", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                    }
                    else
                    {
                        this.labRubricListBID.Text = string.Concat(new object[] { this.labRubricListBID.Text, "<a href='#B", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                    }
                    string[] strArray2 = dataSet.Tables["DRubric"].Rows[i]["OptionAnswer"].ToString().Replace("####", "#").Replace("###", "#").Replace("##", "#").Split(new char[] { '#' });
                    Label label = (Label) this.DataGridB.Rows[i].FindControl("labBDataTitle");
                    Label label2 = (Label) this.DataGridB.Rows[i].FindControl("labBOKAnswer");
                    if (!(this.httpCookie_1.Value == "黎光宇"))
                    {
                        label2.Visible = false;
                    }
                    else
                    {
                        label2.Visible = true;
                        label2.ForeColor = Color.White;
                    }
                    label.Text = string.Concat(new object[] { "<a title='标记此题'  href='#B", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListBID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label.Text.ToString(), "<a name='B", i.ToString(), "'></a>" });
                    CheckBoxList list = (CheckBoxList) this.DataGridB.Rows[i].FindControl("CBLBData");
                    list.Attributes.Add("onclick", "javascript:WriteRBL('labRubricListBID','" + num + "')");
                    for (int j = 0; j < strArray2.Length; j++)
                    {
                        if (!(strArray2[j].Trim() != ""))
                        {
                            continue;
                        }
                        switch (j)
                        {
                            case 0:
                                str = "A";
                                break;

                            case 1:
                                str = "B";
                                break;

                            case 2:
                                str = "C";
                                break;

                            case 3:
                                str = "D";
                                break;

                            case 4:
                                str = "E";
                                break;

                            case 5:
                                str = "F";
                                break;
                        }
                        ListItem item2 = new ListItem(strArray2[j].Replace("＃", "#"), str);
                        list.Items.Add(item2);
                    }
                    if ((this.httpCookie_1.Value != "黎光宇") && !(!(string_41.Trim() == "B") ? !(string_41.Trim() == "D") : false))
                    {
                        for (int m = 0; m < 3; m++)
                        {
                            int index = random.Next(list.Items.Count);
                            string text = "";
                            string str5 = "";
                            text = list.Items[index].Text;
                            str5 = list.Items[index].Value;
                            list.Items.RemoveAt(index);
                            ListItem item = new ListItem(text, str5);
                            list.Items.Insert(0, item);
                        }
                    }
                    for (int k = 0; k < list.Items.Count; k++)
                    {
                        switch (k)
                        {
                            case 0:
                                list.Items[k].Text = "A、" + list.Items[k].Text;
                                break;

                            case 1:
                                list.Items[k].Text = "B、" + list.Items[k].Text;
                                break;

                            case 2:
                                list.Items[k].Text = "C、" + list.Items[k].Text;
                                break;

                            case 3:
                                list.Items[k].Text = "D、" + list.Items[k].Text;
                                break;

                            case 4:
                                list.Items[k].Text = "E、" + list.Items[k].Text;
                                break;

                            case 5:
                                list.Items[k].Text = "F、" + list.Items[k].Text;
                                break;
                        }
                    }
                }
                adapter.Dispose();
                dataSet.Clear();
                dataSet.Dispose();
                selectConnection.Close();
                selectConnection.Dispose();
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BRubricB", "alert('多选题显示出错,可能有错误格式的试题！')", true);
            }
        }

        private void method_7(string string_39, string string_40)
        {
            try
            {
                this.DataGridC.Visible = true;
                int num = 0;
                string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo  where RubricType='C'";
                selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
                SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
                DataSet dataSet = new DataSet();
                adapter.Fill(dataSet, "BRubric");
                this.DataGridC.DataSource = dataSet.Tables["BRubric"].DefaultView;
                this.DataGridC.DataBind();
                for (int i = 0; i < this.DataGridC.Rows.Count; i++)
                {
                    num++;
                    if (i != 0)
                    {
                        this.labRubricListCID.Text = string.Concat(new object[] { this.labRubricListCID.Text, "<a href='#C", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                    }
                    else
                    {
                        this.labRubricListCID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeC'>", this.publicFun_0.GetRubricType("C", this.intPaperID.ToString()), "</a>:</B> <a href='#C", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                    }
                    RadioButtonList list = (RadioButtonList) this.DataGridC.Rows[i].FindControl("RBLCData");
                    list.Attributes.Add("onclick", "javascript:WriteRBL('labRubricListCID','" + num + "')");
                    Label label2 = (Label) this.DataGridC.Rows[i].FindControl("labCDataTitle");
                    label2.Text = string.Concat(new object[] { "<a title='标记此题'  href='#C", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListCID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label2.Text.ToString(), "<a name='C", i.ToString(), "'></a>" });
                    Label label = (Label) this.DataGridC.Rows[i].FindControl("labCOKAnswer");
                    if (!(this.httpCookie_1.Value == "黎光宇"))
                    {
                        label.Visible = false;
                    }
                    else
                    {
                        label.Visible = true;
                        label.ForeColor = Color.White;
                    }
                }
                adapter.Dispose();
                dataSet.Clear();
                dataSet.Dispose();
                selectConnection.Close();
                selectConnection.Dispose();
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BRubricC", "alert('判断题显示出错,可能有错误格式的试题！')", true);
            }
        }

        private void method_8(string string_39, string string_40)
        {
            try
            {
                this.DataGridD.Visible = true;
                int num = 0;
                string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo  where RubricType='D'";
                selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
                SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
                DataSet dataSet = new DataSet();
                adapter.Fill(dataSet, "FRubric");
                this.DataGridD.DataSource = dataSet.Tables["FRubric"].DefaultView;
                this.DataGridD.DataBind();
                for (int i = 0; i < this.DataGridD.Rows.Count; i++)
                {
                    num++;
                    if (i == 0)
                    {
                        this.labRubricListDID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeD'>", this.publicFun_0.GetRubricType("D", this.intPaperID.ToString()), "</a>:</B> <a href='#D", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                    }
                    else
                    {
                        this.labRubricListDID.Text = string.Concat(new object[] { this.labRubricListDID.Text, "<a href='#D", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                    }
                    Label label2 = (Label) this.DataGridD.Rows[i].FindControl("labDDataTitle");
                    TextBox box = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerA");
                    TextBox box2 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerB");
                    TextBox box3 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerC");
                    TextBox box4 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerD");
                    TextBox box5 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerE");
                    TextBox box6 = (TextBox) this.DataGridD.Rows[i].FindControl("txtDAnswerF");
                    switch (label2.Text.ToString().Replace("___", "№").Split(new char[] { '№' }).Length)
                    {
                        case 1:
                            box.Visible = false;
                            box2.Visible = false;
                            box3.Visible = false;
                            box4.Visible = false;
                            box5.Visible = false;
                            box6.Visible = false;
                            break;

                        case 2:
                            box.Visible = true;
                            box2.Visible = false;
                            box3.Visible = false;
                            box4.Visible = false;
                            box5.Visible = false;
                            box6.Visible = false;
                            break;

                        case 3:
                            box.Visible = true;
                            box2.Visible = true;
                            box3.Visible = false;
                            box4.Visible = false;
                            box5.Visible = false;
                            box6.Visible = false;
                            break;

                        case 4:
                            box.Visible = true;
                            box2.Visible = true;
                            box3.Visible = true;
                            box4.Visible = false;
                            box5.Visible = false;
                            box6.Visible = false;
                            break;

                        case 5:
                            box.Visible = true;
                            box2.Visible = true;
                            box3.Visible = true;
                            box4.Visible = true;
                            box5.Visible = false;
                            box6.Visible = false;
                            break;

                        case 6:
                            box.Visible = true;
                            box2.Visible = true;
                            box3.Visible = true;
                            box4.Visible = true;
                            box5.Visible = true;
                            box6.Visible = false;
                            break;

                        case 7:
                            box.Visible = true;
                            box2.Visible = true;
                            box3.Visible = true;
                            box4.Visible = true;
                            box5.Visible = true;
                            box6.Visible = true;
                            break;
                    }
                    box.Attributes.Add("onpaste", "return false");
                    box2.Attributes.Add("onpaste", "return false");
                    box3.Attributes.Add("onpaste", "return false");
                    box4.Attributes.Add("onpaste", "return false");
                    box5.Attributes.Add("onpaste", "return false");
                    box6.Attributes.Add("onpaste", "return false");
                    box.Attributes.Add("onmouseout", string.Concat(new object[] { "javascript:WriteText('DataGridD_txtDAnswerA_", i.ToString(), "','labRubricListDID','", num, "')" }));
                    label2.Text = string.Concat(new object[] { "<a title='标记此题'  href='#D", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListDID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label2.Text.ToString(), "<a name='D", i.ToString(), "'></a>" });
                    Label label = (Label) this.DataGridD.Rows[i].FindControl("labDOKAnswer");
                    if (!(this.httpCookie_1.Value == "黎光宇"))
                    {
                        label.Visible = false;
                    }
                    else
                    {
                        label.Visible = true;
                        label.ForeColor = Color.White;
                    }
                }
                adapter.Dispose();
                dataSet.Clear();
                dataSet.Dispose();
                selectConnection.Close();
                selectConnection.Dispose();
            }
            catch
            {
                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BRubricD", "alert('填空题显示出错,可能有错误格式的试题！')", true);
            }
        }

        private void method_9(string string_39, string string_40)
        {
            this.DataGridE.Visible = true;
            int num = 0;
            string selectCommandText = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer,OKAnswer from RubricInfo Where RubricType='E'";
            selectCommandText = selectCommandText + " and ID in(" + string_39.Replace("#", ",") + "0) order by " + string_40;
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(selectCommandText, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "ARubric");
            this.DataGridE.DataSource = dataSet.Tables["ARubric"].DefaultView;
            this.DataGridE.DataBind();
            for (int i = 0; i < this.DataGridE.Rows.Count; i++)
            {
                num++;
                if (i != 0)
                {
                    this.labRubricListEID.Text = string.Concat(new object[] { this.labRubricListEID.Text, "<a href='#E", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                else
                {
                    this.labRubricListEID.Text = string.Concat(new object[] { "<br><B><a href='#RubricTypeE'>", this.publicFun_0.GetRubricType("E", this.intPaperID.ToString()), "</a>:</B> <a href='#E", i.ToString(), "'><font color=blue>", num, "、</font></a>" });
                }
                Label label2 = (Label) this.DataGridE.Rows[i].FindControl("labEDataTitle");
                label2.Text = string.Concat(new object[] { "<a title='标记此题'  href='#E", i.ToString(), "' onclick=javascript:SetTipRubricID('labRubricListEID','", num, "')><img src='../image/MenuICO/Menu36.gif' border=0></a>", num.ToString(), "、", label2.Text.ToString(), "<a name='E", i.ToString(), "'></a>" });
                TextBox box = (TextBox) this.DataGridE.Rows[i].FindControl("txtEAnswer");
                box.Attributes.Add("onpaste", "return false");
                box.Attributes.Add("onmouseout", string.Concat(new object[] { "javascript:WriteText('DataGridE_txtEAnswer_", i.ToString(), "','labRubricListEID','", num, "')" }));
                Label label = (Label) this.DataGridE.Rows[i].FindControl("labEOKAnswer");
                if (!(this.httpCookie_1.Value == "黎光宇"))
                {
                    label.Visible = false;
                }
                else
                {
                    label.Visible = true;
                    label.ForeColor = Color.White;
                }
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.httpCookie_0 = new HttpCookie("ExamUserCode");
            this.httpCookie_0 = base.Request.Cookies["ExamUserCode"];
            this.httpCookie_1 = new HttpCookie("ExamUserName");
            this.httpCookie_1 = base.Request.Cookies["ExamUserName"];
            this.httpCookie_2 = new HttpCookie("ExamUserLevel");
            this.httpCookie_2 = base.Request.Cookies["ExamUserLevel"];
            this.httpCookie_3 = new HttpCookie("ExamDeptID");
            this.httpCookie_3 = base.Request.Cookies["ExamDeptID"];
            this.httpCookie_4 = new HttpCookie("ExamDeptName");
            this.httpCookie_4 = base.Request.Cookies["ExamDeptName"];
            if ((this.httpCookie_0 == null) || (this.httpCookie_0.Value == ""))
            {
                base.Response.Write("<script language=javascript>top.location.href='../Index.htm';self.close();</script>");
            }
            else
            {
                this.intPaperID = Convert.ToInt32(base.Request["PaperID"].ToString());
                this.strLoadInfo = base.Request["LoadInfo"].ToString();
                base.Response.Expires = 0;
                this.httpCookie_0.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_0.Value));
                this.httpCookie_1.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_1.Value));
                this.httpCookie_2.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_2.Value));
                this.httpCookie_3.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_3.Value));
                this.httpCookie_4.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_4.Value));
                if (!base.IsPostBack)
                {
                    this.ViewState["ExamType"] = "A";
                    this.ViewState["ExamName"] = "";
                    this.ViewState["LoginTime"] = DateTime.Now.ToString();
                    this.ViewState["JoinExamStartTime"] = DateTime.Now.ToString();
                    this.ViewState["IEBack"] = "0";
                    this.labUserCode.Text = this.httpCookie_0.Value;
                    this.labUserName.Text = this.httpCookie_1.Value;
                    this.labDeptName.Text = this.httpCookie_4.Value;
                    if (this.labDeptName.Text.Trim().Length > 10)
                    {
                        this.labDeptName.Text = this.labDeptName.Text.Substring(0, 10) + "…";
                    }
                    string str14 = this.publicFun_0.GetValues("select UserPhoto from UserInfo where UserCode='" + this.httpCookie_0.Value + "'", "UserPhoto").Trim();
                    if (str14 != "")
                    {
                        this.ImageUser.ImageUrl = "../PublicFile/" + str14;
                    }
                    string str13 = "";
                    string str12 = "";
                    SqlConnection connection2 = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                    connection2.Open();
                    SqlCommand command2 = new SqlCommand(string.Concat(new object[] { "select b.JoinExamNum,a.JoinExamNum as ExamNum,a.StartTime,a.EndTime,a.ExamType,a.Flag,a.ExamName from ExamUser a,PaperInfo b where b.ID=a.PaperID and a.UserCode='", this.httpCookie_0.Value.Trim(), "' and a.PaperID=", this.intPaperID }), connection2);
                    SqlDataReader reader = command2.ExecuteReader(CommandBehavior.CloseConnection);
                    if (reader.Read())
                    {
                        str13 = reader["ExamType"].ToString();
                        str12 = reader["Flag"].ToString();
                        reader["StartTime"].ToString();
                        reader["EndTime"].ToString();
                        reader["ExamName"].ToString();
                        if (!((reader["JoinExamNum"].ToString() != "0") ? !(reader["ExamType"].ToString().Trim() == "A") : true) && (Convert.ToInt32(reader["ExamNum"].ToString()) >= Convert.ToInt32(reader["JoinExamNum"].ToString())))
                        {
                            ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BTipAABACA", "alert('对不起，此份试卷考试次数限制已达到上限，无法再操作！');window.close();", true);
                            return;
                        }
                    }
                    reader.Close();
                    command2.Dispose();
                    connection2.Close();
                    connection2.Dispose();
                    if ((str13 == "A") && (str12 != "A"))
                    {
                        ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BTipAAAA", "alert('对不起，此份试卷您正在考试中或已经交卷或停考，无法再操作！');window.close();", true);
                    }
                    else
                    {
                        string values = this.publicFun_0.GetValues("select MemberFen from PaperInfo where ID=" + this.intPaperID, "MemberFen");
                        if (values.Trim() == "")
                        {
                            values = "0";
                        }
                        if (!(this.publicFun_0.GetValues("select a.UserCode  from UserInfo a,MemberLevel b where getdate()>DateAdd(dd,b.RemoveValue,Convert(dateTime,a.UpdateTime)) and a.UserMember=b.ID and a.UserCode='" + this.httpCookie_0.Value + "' and LevelRemove='C'", "UserCode") == ""))
                        {
                            this.publicFun_0.ExecuteSql("update UserInfo set UserFen=0 where UserCode='" + this.httpCookie_0.Value + "'");
                            ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BTipBBBB", "alert('会员积分不足,充值方可进行考试学习！');window.close();", true);
                        }
                        else
                        {
                            this.bool_0 = this.publicFun_0.OpertionMemberFen(this.httpCookie_0.Value, Convert.ToInt32(values));
                            if (this.bool_0)
                            {
                                this.method_3();
                                this.method_4();
                                if (this.strLoadInfo == "1")
                                {
                                    this.method_15();
                                }
                                string strSql = string.Concat(new object[] { "delete from Systip where GetNumber='", this.httpCookie_0.Value, "' and Formtable='PaperInfo' and FormID=", this.intPaperID });
                                strSql = strSql + ";insert into SysLogInfo(LogDisp,EditUser,EditUserCode) values('参加[" + this.ViewState["ExamName"].ToString() + "]考试并入考场！','" + this.httpCookie_1.Value + "','" + this.httpCookie_0.Value + "')";
                                this.publicFun_0.ExecuteSql(strSql);
                                this.method_1("B");
                                this.RndSaveTime.Value = "0";
                                int num6 = new Random().Next(60);
                                string connectionString = ConfigurationManager.ConnectionStrings["SaveMin"].ConnectionString;
                                string str8 = ConfigurationManager.ConnectionStrings["SaveMax"].ConnectionString;
                                if (num6 < Convert.ToInt32(connectionString))
                                {
                                    this.RndSaveTime.Value = connectionString;
                                }
                                else if (num6 <= Convert.ToInt32(str8))
                                {
                                    this.RndSaveTime.Value = num6.ToString();
                                }
                                else
                                {
                                    this.RndSaveTime.Value = str8;
                                }
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BTip", "alert('退出考场时请单击[交卷]按钮，否则以零分计算！');", true);
                            }
                            else
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BTipBBBB", "alert('会员积分不足,充值方可进行考试学习！');window.close();", true);
                            }
                        }
                    }
                }
                else
                {
                    string str6 = "";
                    string str7 = Convert.ToString(base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
                    if (!(!(str7 == "") ? (str7 != null) : false))
                    {
                        str7 = Convert.ToString(base.Request.ServerVariables["REMOTE_ADDR"]);
                    }
                    this.strEndTime = DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString();
                    TimeSpan span2 = (TimeSpan) (DateTime.Now - Convert.ToDateTime(this.ViewState["JoinExamStartTime"].ToString()));
                    if (!(this.ViewState["ExamType"].ToString() == "C"))
                    {
                        str6 = string.Concat(new object[] { "update ExamUser set LastTime=LastTime-", span2.TotalMinutes.ToString(), ",LastDate='", DateTime.Now.ToShortDateString(), "',LoginIP='", str7, "',EndTime='", this.strEndTime, "' where UserCode='", this.httpCookie_0.Value.Trim(), "' and PaperID=", this.intPaperID });
                        this.ViewState["JoinExamStartTime"] = DateTime.Now.ToString();
                    }
                    else
                    {
                        str6 = string.Concat(new object[] { "update ExamUser set LastTime='", this.labExamTime.Text, "',LastDate='", DateTime.Now.ToShortDateString(), "',LoginIP='", str7, "',EndTime='", this.strEndTime, "' where UserCode='", this.httpCookie_0.Value.Trim(), "' and PaperID=", this.intPaperID });
                    }
                    this.publicFun_0.ExecuteSql(str6);
                    DateTime time = Convert.ToDateTime(this.ViewState["LoginTime"].ToString());
                    TimeSpan span = (TimeSpan) (DateTime.Now - time);
                    int num3 = Convert.ToInt16(span.TotalMinutes);
                    int num2 = Convert.ToInt16(this.ViewState["PaperSumTime"].ToString());
                    if (num3 <= num2)
                    {
                        int num = (num2 - num3) - 1;
                        if (num == 0)
                        {
                            num = 1;
                        }
                        this.SumTime.Value = num.ToString();
                    }
                    else
                    {
                        this.SumTime.Value = "1";
                    }
                    if (this.ViewState["IEBack"].ToString() == "1")
                    {
                        ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BBack", "window.onblur=auto_submit;", true);
                    }
                    this.labRubricListAID.Text = this.txtARubricListID.Value;
                    this.labRubricListBID.Text = this.txtBRubricListID.Value;
                    this.labRubricListCID.Text = this.txtCRubricListID.Value;
                    this.labRubricListDID.Text = this.txtDRubricListID.Value;
                    this.labRubricListEID.Text = this.txtERubricListID.Value;
                    this.labRubricListFID.Text = this.txtFRubricListID.Value;
                    this.labRubricListGID.Text = this.txtGRubricListID.Value;
                    this.labRubricListHID.Text = this.txtHRubricListID.Value;
                    this.labRubricListIID.Text = this.txtIRubricListID.Value;
                    this.labRubricListJID.Text = this.txtJRubricListID.Value;
                    if (this.txtHideComm.Value.Trim() == "EndExam")
                    {
                        this.txtHideComm.Value = "";
                        string str5 = this.publicFun_0.GetValues(string.Concat(new object[] { "select Flag from ExamUser where ExamType='A' and UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID }), "Flag");
                        if ((((str5 != "C") && (str5 != "D")) && (str5 != "E")) && !(str5 == "Z"))
                        {
                            string str = "";
                            try
                            {
                                this.method_1("C");
                                if (this.DataGridA.Visible)
                                {
                                    this.method_26();
                                }
                                if (this.DataGridB.Visible)
                                {
                                    this.method_27();
                                }
                                if (this.DataGridC.Visible)
                                {
                                    this.method_28();
                                }
                                if (this.DataGridD.Visible)
                                {
                                    this.method_29();
                                }
                                if (this.DataGridE.Visible)
                                {
                                    this.method_30();
                                }
                                if (this.DataGridF.Visible)
                                {
                                    this.method_31();
                                }
                                if (this.DataGridG.Visible)
                                {
                                    this.method_32();
                                }
                                if (this.DataGridH.Visible)
                                {
                                    this.method_33();
                                }
                                if (this.DataGridI.Visible)
                                {
                                    this.method_34();
                                }
                                if (this.DataGridJ.Visible)
                                {
                                    this.method_35();
                                }
                                if (!(this.publicFun_0.GetValues(string.Concat(new object[] { "select PaperID from CheckPaper where UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID }), "PaperID") == ""))
                                {
                                    str = "update CheckPaper set RubricSWrite='" + this.string_1 + "',RubricSOK='" + this.string_2 + "',RubricSFen='" + this.string_0 + "',RubricDWrite='" + this.string_5 + "',RubricDOK='" + this.string_6 + "',RubricDFen='" + this.string_4 + "',";
                                    str = str + "RubricBWrite='" + this.string_9 + "',RubricBOK='" + this.string_10 + "',RubricBFen='" + this.string_8 + "',RubricFFen='" + this.string_12 + "',";
                                    str = str + "RubricAFen='" + this.string_16 + "',RubricCFen='" + this.string_20 + "',";
                                    str = str + "RubricTFen='" + this.string_24 + "',RubricANFen='" + this.string_28 + "',";
                                    str = str + "CheckUserS='" + this.string_3 + "',CheckUserD='" + this.string_7 + "',CheckUserB='" + this.string_11 + "',";
                                    str = string.Concat(new object[] { 
                                        str, "CheckUserF='", this.string_15, "',CheckUserA='", this.string_19, "',CheckUserC='", this.string_23, "',CheckUserT='", this.string_27, "',CheckUserAN='", this.string_30, "',RubricJFen='", this.string_35, "',CheckUserJ='", this.string_38, "',RubricOOK='", 
                                        this.string_34, "',RubricOFen='", this.string_32, "',CheckUserO='", this.string_33, "' where UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID
                                     });
                                }
                                else
                                {
                                    str = "Insert into CheckPaper(PaperID,UserCode,RubricSWrite,RubricSOK,RubricSFen,RubricDWrite,RubricDOK,RubricDFen,RubricBWrite,RubricBOK,RubricBFen,RubricFFen,RubricAFen,RubricCFen,RubricTFen,RubricANFen,CheckUserS,CheckUserD,CheckUserB,CheckUserF,CheckUserA,CheckUserC,CheckUserT,CheckUserAN,RubricJFen,CheckUserJ,RubricOOK,RubricOFen,CheckUserO) values(" + this.intPaperID;
                                    str = str + ",'" + this.httpCookie_0.Value.Trim() + "','" + this.string_1 + "','" + this.string_2 + "','" + this.string_0 + "','" + this.string_5 + "','" + this.string_6 + "','" + this.string_4 + "','" + this.string_9 + "','" + this.string_10 + "','" + this.string_8 + "','" + this.string_12 + "',";
                                    str = str + "'" + this.string_16 + "','" + this.string_20 + "','" + this.string_24 + "','" + this.string_28 + "'";
                                    str = str + ",'" + this.string_3 + "','" + this.string_7 + "','" + this.string_11 + "','" + this.string_15 + "','" + this.string_19 + "','" + this.string_23 + "','" + this.string_27 + "','" + this.string_30 + "','" + this.string_35 + "','" + this.string_38 + "','" + this.string_34 + "','" + this.string_32 + "','" + this.string_33 + "')";
                                }
                                this.publicFun_0.ExecuteSql(str);
                                SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                                connection.Open();
                                SqlCommand command = new SqlCommand(string.Concat(new object[] { "update CheckPaper set RubricFWrite=@RubricFWrite,RubricFOK=@RubricFOK,RubricAWrite=@RubricAWrite,RubricAOK=@RubricAOK,RubricCWrite=@RubricCWrite,RubricCOK=@RubricCOK,RubricTWrite=@RubricTWrite,RubricTOK=@RubricTOK,RubricANWrite=@RubricANWrite,RubricANOK=@RubricANOK,RubricJWrite=@RubricJWrite,RubricJOK=@RubricJOK  where UserCode='", this.httpCookie_0.Value, "' and PaperID=", this.intPaperID }), connection);
                                command.Parameters.Add("@RubricFWrite", SqlDbType.VarChar, 0x1388).Value = this.string_13;
                                command.Parameters.Add("@RubricFOK", SqlDbType.VarChar, 0x1388).Value = this.string_14;
                                command.Parameters.Add("@RubricAWrite", SqlDbType.Text).Value = this.string_17;
                                command.Parameters.Add("@RubricAOK", SqlDbType.Text).Value = this.string_18;
                                command.Parameters.Add("@RubricCWrite", SqlDbType.Text).Value = this.string_21;
                                command.Parameters.Add("@RubricCOK", SqlDbType.Text).Value = this.string_22;
                                command.Parameters.Add("@RubricTWrite", SqlDbType.Text).Value = this.string_25;
                                command.Parameters.Add("@RubricTOK", SqlDbType.Text).Value = this.string_26;
                                command.Parameters.Add("@RubricANWrite", SqlDbType.Text).Value = this.string_29;
                                command.Parameters.Add("@RubricANOK", SqlDbType.Text).Value = this.string_31;
                                command.Parameters.Add("@RubricJWrite", SqlDbType.Text).Value = this.string_36;
                                command.Parameters.Add("@RubricJOK", SqlDbType.Text).Value = this.string_37;
                                command.ExecuteNonQuery();
                                command.Dispose();
                                connection.Close();
                                connection.Dispose();
                                if (!((((!(this.string_38 != "还未批改") || !(this.string_15 != "还未批改")) || (this.DataGridE.Visible || this.DataGridF.Visible)) || (this.DataGridG.Visible || this.DataGridH.Visible)) || this.DataGridI.Visible))
                                {
                                    this.method_1("E");
                                    this.method_0();
                                }
                                else
                                {
                                    this.method_1("D");
                                }
                                string str2 = "";
                                string str3 = this.ViewState["ExamType"].ToString().Trim();
                                if (str3 != null)
                                {
                                    if (!(str3 == "A"))
                                    {
                                        if (str3 == "C")
                                        {
                                            str2 = "TestExamList.aspx";
                                        }
                                    }
                                    else
                                    {
                                        str2 = "../Persion/ExamHistoryList.aspx";
                                    }
                                }
                                base.Response.Write("<script>top.opener.location.href='" + str2 + "';top.self.close();</script>");
                            }
                            catch
                            {
                                this.method_1("G");
                                base.Response.Write("<script>top.opener.location.href='ExamInfoList.aspx';top.self.close();</script>");
                            }
                        }
                        else
                        {
                            ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BSuccTip", "alert('此试卷已交卷，您不能重复提交！');", true);
                        }
                    }
                }
            }
        }
    }
}

